This commit is contained in:
parent
87d9e17919
commit
f24350173b
@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '0.4-SNAPSHOT'
|
id 'fabric-loom' version '0.5-SNAPSHOT'
|
||||||
}
|
}
|
||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
|
@ -4,7 +4,7 @@ org.gradle.jvmargs = -Xmx1G
|
|||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
minecraft_version = 1.16.2-pre1
|
minecraft_version = 1.16.2-pre1
|
||||||
yarn_build = 1
|
yarn_build = 9
|
||||||
fabric_loader_version = 0.9.0+build.204
|
fabric_loader_version = 0.9.0+build.204
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
@ -13,7 +13,7 @@ org.gradle.jvmargs = -Xmx1G
|
|||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
fabric_api_version = 0.16.2+build.389-1.16
|
fabric_api_version = 0.16.3+build.390-1.16
|
||||||
modmenu_version = 1.14.5+build.30
|
modmenu_version = 1.14.5+build.30
|
||||||
cloth_config_version = 4.7.0-unstable
|
cloth_config_version = 4.7.0-unstable
|
||||||
autoconfig_version = 3.2.0-unstable
|
autoconfig_version = 3.2.0-unstable
|
||||||
|
@ -137,7 +137,7 @@ public class EnergyPortalBlock extends SimpleBlock {
|
|||||||
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
|
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
|
||||||
super.onEntityCollision(state, world, pos, entity);
|
super.onEntityCollision(state, world, pos, entity);
|
||||||
|
|
||||||
if (!world.isClient() && entity.canUsePortals() && ((PortalCooldownEntity) entity).isEnergyPortalCooldown()) {
|
if (!world.isClient() && !entity.hasVehicle() && entity.canUsePortals() && ((PortalCooldownEntity) entity).isEnergyPortalCooldown()) {
|
||||||
// Teleport
|
// Teleport
|
||||||
((PortalCooldownEntity) entity).resetEnergyPortalCooldown();
|
((PortalCooldownEntity) entity).resetEnergyPortalCooldown();
|
||||||
}
|
}
|
||||||
|
@ -120,9 +120,9 @@ public class StructureGeneratorBlock extends SimpleBlockWithEntity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addToBiome(GenerationSettings.class_5495 arg) {
|
public static void addToBiome(GenerationSettings.Builder builder) {
|
||||||
for (Map.Entry<String, StructureGeneratorBlock> entry : blocks.entrySet()) {
|
for (Map.Entry<String, StructureGeneratorBlock> entry : blocks.entrySet()) {
|
||||||
arg.method_30995(entry.getValue().feature.configure(DefaultFeatureConfig.INSTANCE));
|
builder.structureFeature(entry.getValue().feature.configure(DefaultFeatureConfig.INSTANCE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ package com.thebrokenrail.energonrelics.mixin;
|
|||||||
|
|
||||||
import com.thebrokenrail.energonrelics.EnergonRelics;
|
import com.thebrokenrail.energonrelics.EnergonRelics;
|
||||||
import com.thebrokenrail.energonrelics.block.structure.StructureGeneratorBlock;
|
import com.thebrokenrail.energonrelics.block.structure.StructureGeneratorBlock;
|
||||||
import net.minecraft.world.biome.Biome;
|
|
||||||
import net.minecraft.world.biome.GenerationSettings;
|
import net.minecraft.world.biome.GenerationSettings;
|
||||||
import net.minecraft.world.gen.GenerationStep;
|
import net.minecraft.world.gen.GenerationStep;
|
||||||
import net.minecraft.world.gen.feature.DefaultBiomeFeatures;
|
import net.minecraft.world.gen.feature.DefaultBiomeFeatures;
|
||||||
@ -14,12 +13,12 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
@Mixin(DefaultBiomeFeatures.class)
|
@Mixin(DefaultBiomeFeatures.class)
|
||||||
public class MixinDefaultBiomeFeatures {
|
public class MixinDefaultBiomeFeatures {
|
||||||
@Inject(at = @At("RETURN"), method = "addDefaultOres")
|
@Inject(at = @At("RETURN"), method = "addDefaultOres")
|
||||||
private static void addDefaultOres(GenerationSettings.class_5495 arg, CallbackInfo info) {
|
private static void addDefaultOres(GenerationSettings.Builder builder, CallbackInfo info) {
|
||||||
arg.method_30992(GenerationStep.Feature.UNDERGROUND_ORES, EnergonRelics.VERIDIUM_ORE_FEATURE);
|
builder.feature(GenerationStep.Feature.UNDERGROUND_ORES, EnergonRelics.VERIDIUM_ORE_FEATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(at = @At("RETURN"), method = "addDefaultUndergroundStructures")
|
@Inject(at = @At("RETURN"), method = "addDefaultUndergroundStructures")
|
||||||
private static void addDefaultUndergroundStructures(GenerationSettings.class_5495 arg, CallbackInfo info) {
|
private static void addDefaultUndergroundStructures(GenerationSettings.Builder builder, CallbackInfo info) {
|
||||||
StructureGeneratorBlock.addToBiome(arg);
|
StructureGeneratorBlock.addToBiome(builder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user