diff --git a/WunderLib b/WunderLib index 02ea056d..7ff96d5c 160000 --- a/WunderLib +++ b/WunderLib @@ -1 +1 @@ -Subproject commit 02ea056d4050c11b1d0f9314baf6da6c08f05f42 +Subproject commit 7ff96d5c744127d887861ad8c06b8c7400ec9880 diff --git a/gradle.properties b/gradle.properties index c4832342..fc0cc7ae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,20 +1,20 @@ # Done to increase the memory available to gradle. org.gradle.jvmargs=-Xmx8G #Modrinth -modrinth_versions=["1.19.3"] +modrinth_versions=["1.19.4"] #`release`, `beta` or `alpha` release_channel=beta #Loom loom_version=1.0-SNAPSHOT # Fabric Properties # check these on https://fabricmc.net/versions.html -minecraft_version=1.19.3 -loader_version=0.14.11 -fabric_version=0.68.1+1.19.3 +minecraft_version=1.19.4 +loader_version=0.14.19 +fabric_version=0.77.0+1.19.4 # Mod Properties -mod_version=2.2.5 +mod_version=2.3.0 maven_group=org.betterx.bclib archives_base_name=bclib # Dependencies -modmenu_version=5.0.1 -emi_version=0.6.2+1.19.3 \ No newline at end of file +modmenu_version=6.1.0-rc.3 +emi_version=0.7.3+1.19.4 \ No newline at end of file diff --git a/src/main/java/org/betterx/bclib/api/v2/advancement/AdvancementManager.java b/src/main/java/org/betterx/bclib/api/v2/advancement/AdvancementManager.java index 8fb82a08..6bd1c8d1 100644 --- a/src/main/java/org/betterx/bclib/api/v2/advancement/AdvancementManager.java +++ b/src/main/java/org/betterx/bclib/api/v2/advancement/AdvancementManager.java @@ -7,6 +7,7 @@ import org.betterx.bclib.items.complex.EquipmentSet; import net.minecraft.advancements.*; import net.minecraft.advancements.critereon.*; +import net.minecraft.client.Minecraft; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.data.recipes.RecipeBuilder; import net.minecraft.network.chat.Component; @@ -199,7 +200,7 @@ public class AdvancementManager { T recipe, AdvancementType type ) { - Item item = recipe.getResultItem().getItem(); + Item item = recipe.getResultItem(Minecraft.getInstance().level.registryAccess()).getItem(); return create(item, type, displayBuilder -> displayBuilder.hideToast().hideFromChat()) //.awardRecipe(item) .addRecipeUnlockCriterion("has_the_recipe", recipe) diff --git a/src/main/java/org/betterx/bclib/api/v2/generator/BCLBiomeSource.java b/src/main/java/org/betterx/bclib/api/v2/generator/BCLBiomeSource.java index 56c40309..040f8975 100644 --- a/src/main/java/org/betterx/bclib/api/v2/generator/BCLBiomeSource.java +++ b/src/main/java/org/betterx/bclib/api/v2/generator/BCLBiomeSource.java @@ -45,7 +45,7 @@ public abstract class BCLBiomeSource extends BiomeSource implements BiomeSourceW Set> dynamicPossibleBiomes; protected BCLBiomeSource(long seed) { - super(List.of()); + super(); this.dynamicPossibleBiomes = Set.of(); this.currentSeed = seed; this.didCreatePickers = false; diff --git a/src/main/java/org/betterx/bclib/api/v2/generator/BCLibEndBiomeSource.java b/src/main/java/org/betterx/bclib/api/v2/generator/BCLibEndBiomeSource.java index 1de6223b..7f1ad7d6 100644 --- a/src/main/java/org/betterx/bclib/api/v2/generator/BCLibEndBiomeSource.java +++ b/src/main/java/org/betterx/bclib/api/v2/generator/BCLibEndBiomeSource.java @@ -28,6 +28,7 @@ import java.awt.*; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.stream.Stream; import org.jetbrains.annotations.NotNull; public class BCLibEndBiomeSource extends BCLBiomeSource implements BiomeSourceWithConfig { @@ -94,6 +95,11 @@ public class BCLibEndBiomeSource extends BCLBiomeSource implements BiomeSourceWi } } + @Override + protected Stream> collectPossibleBiomes() { + return null; + } + @Override protected BiomeAPI.BiomeType defaultBiomeType() { return BiomeAPI.BiomeType.END; diff --git a/src/main/java/org/betterx/bclib/api/v2/generator/BCLibNetherBiomeSource.java b/src/main/java/org/betterx/bclib/api/v2/generator/BCLibNetherBiomeSource.java index a786502e..ac116d8e 100644 --- a/src/main/java/org/betterx/bclib/api/v2/generator/BCLibNetherBiomeSource.java +++ b/src/main/java/org/betterx/bclib/api/v2/generator/BCLibNetherBiomeSource.java @@ -27,6 +27,7 @@ import net.fabricmc.fabric.api.biome.v1.NetherBiomes; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.stream.Stream; public class BCLibNetherBiomeSource extends BCLBiomeSource implements BiomeSourceWithConfig { public static final Codec CODEC = RecordCodecBuilder @@ -78,6 +79,11 @@ public class BCLibNetherBiomeSource extends BCLBiomeSource implements BiomeSourc } } + @Override + protected Stream> collectPossibleBiomes() { + return null; + } + @Override protected BiomeAPI.BiomeType defaultBiomeType() { return BiomeAPI.BiomeType.NETHER; diff --git a/src/main/java/org/betterx/bclib/api/v2/levelgen/LevelGenEvents.java b/src/main/java/org/betterx/bclib/api/v2/levelgen/LevelGenEvents.java index 11aba592..5c5f5713 100644 --- a/src/main/java/org/betterx/bclib/api/v2/levelgen/LevelGenEvents.java +++ b/src/main/java/org/betterx/bclib/api/v2/levelgen/LevelGenEvents.java @@ -30,7 +30,6 @@ import net.minecraft.world.level.storage.LevelStorageSource; import java.nio.file.Path; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.function.Consumer; public class LevelGenEvents { @@ -73,17 +72,17 @@ public class LevelGenEvents { return DataFixerAPI.fixData(storageAccess, allDone != null && BCLib.isClient(), allDone); } - private static Optional> adaptWorldPreset( - Optional> currentPreset, + private static Holder adaptWorldPreset( + Holder currentPreset, WorldDimensions worldDims ) { LevelStem endStem = worldDims.dimensions().get(LevelStem.END); //We probably loaded a Datapack for the End if (!(endStem.generator().getBiomeSource() instanceof BCLibEndBiomeSource)) { - if (currentPreset.isPresent()) { - if (currentPreset.get().value() instanceof TogetherWorldPreset worldPreset) { - ResourceKey worldPresetKey = currentPreset.get().unwrapKey().orElse(null); + if (currentPreset != null) { + if (currentPreset instanceof TogetherWorldPreset worldPreset) { + ResourceKey worldPresetKey = currentPreset.unwrapKey().orElse(null); //user did not configure/change the Preset! if (PresetsRegistry.BCL_WORLD.equals(worldPresetKey) diff --git a/src/main/java/org/betterx/bclib/api/v2/levelgen/biomes/BCLBiomeBuilder.java b/src/main/java/org/betterx/bclib/api/v2/levelgen/biomes/BCLBiomeBuilder.java index 1afc2594..d61b9f43 100644 --- a/src/main/java/org/betterx/bclib/api/v2/levelgen/biomes/BCLBiomeBuilder.java +++ b/src/main/java/org/betterx/bclib/api/v2/levelgen/biomes/BCLBiomeBuilder.java @@ -93,7 +93,7 @@ public class BCLBiomeBuilder { private BiomeSpecialEffects.Builder effectsBuilder; private MobSpawnSettings.Builder spawnSettings; private SurfaceRules.RuleSource surfaceRule; - private Precipitation precipitation; + private boolean hasPrecipitation; final private ResourceLocation biomeID; @@ -116,7 +116,7 @@ public class BCLBiomeBuilder { BCLBiomeBuilder(ResourceLocation biomeID) { this.biomeID = biomeID; - this.precipitation = Precipitation.NONE; + this.hasPrecipitation = false; this.generationSettings = null; this.effectsBuilder = null; this.spawnSettings = null; @@ -174,9 +174,21 @@ public class BCLBiomeBuilder { * * @param precipitation {@link Precipitation} * @return same {@link BCLBiomeBuilder} instance. + * @deprecated Use hasPrecipitation() instead */ + @Deprecated(forRemoval = true) public BCLBiomeBuilder precipitation(Precipitation precipitation) { - this.precipitation = precipitation; + return hasPrecipitation(precipitation != Precipitation.NONE); + } + + /** + * Set biome {@link Precipitation}. Affect biome visual effects (rain, snow, none). + * + * @param precipitation true, if this biome can have presipitation. Rain/Snow is determined by temperature + * @return same {@link BCLBiomeBuilder} instance. + */ + public BCLBiomeBuilder hasPrecipitation(boolean precipitation) { + this.hasPrecipitation = precipitation; return this; } @@ -948,7 +960,7 @@ public class BCLBiomeBuilder { BiomeBuilder builder = new BiomeBuilder() - .precipitation(precipitation) + .hasPrecipitation(hasPrecipitation) .temperature(temperature) .downfall(downfall); diff --git a/src/main/java/org/betterx/bclib/api/v2/levelgen/structures/StructureWorldNBT.java b/src/main/java/org/betterx/bclib/api/v2/levelgen/structures/StructureWorldNBT.java index 58d7c187..2917ce4e 100644 --- a/src/main/java/org/betterx/bclib/api/v2/levelgen/structures/StructureWorldNBT.java +++ b/src/main/java/org/betterx/bclib/api/v2/levelgen/structures/StructureWorldNBT.java @@ -253,8 +253,8 @@ public class StructureWorldNBT extends StructureNBT { float y1 = Math.min(offsetY, 0); float y2 = Math.max(offsetY, 0); - BlockPos start = pos.offset(-(size.getX() >> 1), y1, -(size.getZ() >> 1)); - BlockPos end = pos.offset(size.getX() >> 1, y2, size.getZ() >> 1); + BlockPos start = pos.offset(-(size.getX() >> 1), (int) y1, -(size.getZ() >> 1)); + BlockPos end = pos.offset(size.getX() >> 1, (int) y2, size.getZ() >> 1); int count = 0; for (int x = start.getX(); x <= end.getX(); x++) { diff --git a/src/main/java/org/betterx/bclib/blocks/BaseButtonBlock.java b/src/main/java/org/betterx/bclib/blocks/BaseButtonBlock.java index 49cf3d2b..60345937 100644 --- a/src/main/java/org/betterx/bclib/blocks/BaseButtonBlock.java +++ b/src/main/java/org/betterx/bclib/blocks/BaseButtonBlock.java @@ -10,12 +10,12 @@ import net.minecraft.client.resources.model.BlockModelRotation; import net.minecraft.client.resources.model.UnbakedModel; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; -import net.minecraft.sounds.SoundEvents; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.ButtonBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.AttachFace; +import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.storage.loot.LootContext; import net.fabricmc.api.EnvType; @@ -30,14 +30,19 @@ import org.jetbrains.annotations.Nullable; public abstract class BaseButtonBlock extends ButtonBlock implements BlockModelProvider { private final Block parent; - protected BaseButtonBlock(Block parent, Properties properties, boolean sensitive) { - this(parent, properties, 30, sensitive); + protected BaseButtonBlock(Block parent, Properties properties, boolean sensitive, BlockSetType type) { + this(parent, properties, 30, sensitive, type); } - protected BaseButtonBlock(Block parent, Properties properties, int ticksToStayPressed, boolean sensitive) { + protected BaseButtonBlock( + Block parent, + Properties properties, + int ticksToStayPressed, + boolean sensitive, + BlockSetType type + ) { super( - properties.noCollission(), ticksToStayPressed, sensitive, - SoundEvents.STONE_BUTTON_CLICK_OFF, SoundEvents.STONE_BUTTON_CLICK_ON + properties.noCollission(), type, ticksToStayPressed, sensitive ); this.parent = parent; } diff --git a/src/main/java/org/betterx/bclib/blocks/BaseDoorBlock.java b/src/main/java/org/betterx/bclib/blocks/BaseDoorBlock.java index cc9131df..6e1635c8 100644 --- a/src/main/java/org/betterx/bclib/blocks/BaseDoorBlock.java +++ b/src/main/java/org/betterx/bclib/blocks/BaseDoorBlock.java @@ -13,7 +13,6 @@ import net.minecraft.client.resources.model.BlockModelRotation; import net.minecraft.client.resources.model.UnbakedModel; import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; -import net.minecraft.sounds.SoundEvents; import net.minecraft.tags.BlockTags; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; @@ -24,6 +23,7 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.DoorBlock; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.block.state.properties.DoorHingeSide; import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; import net.minecraft.world.level.storage.loot.LootContext; @@ -38,12 +38,12 @@ import java.util.Optional; import org.jetbrains.annotations.Nullable; public class BaseDoorBlock extends DoorBlock implements RenderLayerProvider, BlockModelProvider, TagProvider { - public BaseDoorBlock(Block source) { - this(Properties.copy(source).strength(3F, 3F).noOcclusion()); + public BaseDoorBlock(Block source, BlockSetType type) { + this(Properties.copy(source).strength(3F, 3F).noOcclusion(), type); } - public BaseDoorBlock(BlockBehaviour.Properties properties) { - super(properties, SoundEvents.WOODEN_DOOR_CLOSE, SoundEvents.WOODEN_DOOR_OPEN); + public BaseDoorBlock(BlockBehaviour.Properties properties, BlockSetType type) { + super(properties, type); } @Override diff --git a/src/main/java/org/betterx/bclib/blocks/BaseGateBlock.java b/src/main/java/org/betterx/bclib/blocks/BaseGateBlock.java index 22363d3a..bf222a44 100644 --- a/src/main/java/org/betterx/bclib/blocks/BaseGateBlock.java +++ b/src/main/java/org/betterx/bclib/blocks/BaseGateBlock.java @@ -9,11 +9,11 @@ import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.resources.model.UnbakedModel; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; -import net.minecraft.sounds.SoundEvents; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.FenceGateBlock; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.WoodType; import net.minecraft.world.level.storage.loot.LootContext; import net.fabricmc.api.EnvType; @@ -28,8 +28,8 @@ import org.jetbrains.annotations.Nullable; public class BaseGateBlock extends FenceGateBlock implements BlockModelProvider { private final Block parent; - public BaseGateBlock(Block source) { - super(Properties.copy(source).noOcclusion(), SoundEvents.FENCE_GATE_CLOSE, SoundEvents.FENCE_GATE_OPEN); + public BaseGateBlock(Block source, WoodType type) { + super(Properties.copy(source).noOcclusion(), type); this.parent = source; } diff --git a/src/main/java/org/betterx/bclib/blocks/BasePressurePlateBlock.java b/src/main/java/org/betterx/bclib/blocks/BasePressurePlateBlock.java index ac90160c..42fd9ab2 100644 --- a/src/main/java/org/betterx/bclib/blocks/BasePressurePlateBlock.java +++ b/src/main/java/org/betterx/bclib/blocks/BasePressurePlateBlock.java @@ -9,11 +9,11 @@ import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.resources.model.UnbakedModel; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; -import net.minecraft.sounds.SoundEvents; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.PressurePlateBlock; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.storage.loot.LootContext; import net.fabricmc.api.EnvType; @@ -28,10 +28,10 @@ import org.jetbrains.annotations.Nullable; public class BasePressurePlateBlock extends PressurePlateBlock implements BlockModelProvider { private final Block parent; - public BasePressurePlateBlock(Sensitivity rule, Block source) { + public BasePressurePlateBlock(Sensitivity rule, Block source, BlockSetType type) { super( rule, Properties.copy(source).noCollission().noOcclusion().strength(0.5F), - SoundEvents.WOODEN_PRESSURE_PLATE_CLICK_OFF, SoundEvents.WOODEN_PRESSURE_PLATE_CLICK_ON + type ); this.parent = source; } diff --git a/src/main/java/org/betterx/bclib/blocks/BaseStoneButtonBlock.java b/src/main/java/org/betterx/bclib/blocks/BaseStoneButtonBlock.java index 901f4469..a7e34ef3 100644 --- a/src/main/java/org/betterx/bclib/blocks/BaseStoneButtonBlock.java +++ b/src/main/java/org/betterx/bclib/blocks/BaseStoneButtonBlock.java @@ -3,11 +3,12 @@ package org.betterx.bclib.blocks; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.properties.BlockSetType; public class BaseStoneButtonBlock extends BaseButtonBlock { - public BaseStoneButtonBlock(Block source) { - super(source, Properties.copy(source).noOcclusion(), false); + public BaseStoneButtonBlock(Block source, BlockSetType type) { + super(source, Properties.copy(source).noOcclusion(), false, type); } @Override diff --git a/src/main/java/org/betterx/bclib/blocks/BaseTrapdoorBlock.java b/src/main/java/org/betterx/bclib/blocks/BaseTrapdoorBlock.java index e7729cfd..a591720e 100644 --- a/src/main/java/org/betterx/bclib/blocks/BaseTrapdoorBlock.java +++ b/src/main/java/org/betterx/bclib/blocks/BaseTrapdoorBlock.java @@ -11,12 +11,12 @@ import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.resources.model.BlockModelRotation; import net.minecraft.client.resources.model.UnbakedModel; import net.minecraft.resources.ResourceLocation; -import net.minecraft.sounds.SoundEvents; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.TrapDoorBlock; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.block.state.properties.Half; import net.minecraft.world.level.storage.loot.LootContext; @@ -27,12 +27,12 @@ import java.util.*; import org.jetbrains.annotations.Nullable; public class BaseTrapdoorBlock extends TrapDoorBlock implements RenderLayerProvider, BlockModelProvider { - public BaseTrapdoorBlock(Block source) { - this(Properties.copy(source).strength(3.0F, 3.0F).noOcclusion()); + public BaseTrapdoorBlock(Block source, BlockSetType type) { + this(Properties.copy(source).strength(3.0F, 3.0F).noOcclusion(), type); } - public BaseTrapdoorBlock(BlockBehaviour.Properties properties) { - super(properties, SoundEvents.WOODEN_TRAPDOOR_CLOSE, SoundEvents.WOODEN_TRAPDOOR_OPEN); + public BaseTrapdoorBlock(BlockBehaviour.Properties properties, BlockSetType type) { + super(properties, type); } @Override diff --git a/src/main/java/org/betterx/bclib/blocks/BaseWeightedPlateBlock.java b/src/main/java/org/betterx/bclib/blocks/BaseWeightedPlateBlock.java index ab45b46b..a6e99105 100644 --- a/src/main/java/org/betterx/bclib/blocks/BaseWeightedPlateBlock.java +++ b/src/main/java/org/betterx/bclib/blocks/BaseWeightedPlateBlock.java @@ -9,11 +9,11 @@ import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.resources.model.UnbakedModel; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; -import net.minecraft.sounds.SoundEvents; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.WeightedPressurePlateBlock; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.storage.loot.LootContext; import net.fabricmc.api.EnvType; @@ -28,7 +28,7 @@ import org.jetbrains.annotations.Nullable; public class BaseWeightedPlateBlock extends WeightedPressurePlateBlock implements BlockModelProvider { private final Block parent; - public BaseWeightedPlateBlock(Block source) { + public BaseWeightedPlateBlock(Block source, BlockSetType type) { super( 15, Properties.copy(source) @@ -36,7 +36,7 @@ public class BaseWeightedPlateBlock extends WeightedPressurePlateBlock implement .noOcclusion() .requiresCorrectToolForDrops() .strength(0.5F), - SoundEvents.METAL_PRESSURE_PLATE_CLICK_OFF, SoundEvents.METAL_PRESSURE_PLATE_CLICK_ON + type ); this.parent = source; } diff --git a/src/main/java/org/betterx/bclib/blocks/BaseWoodenButtonBlock.java b/src/main/java/org/betterx/bclib/blocks/BaseWoodenButtonBlock.java index 73569534..6f30f88e 100644 --- a/src/main/java/org/betterx/bclib/blocks/BaseWoodenButtonBlock.java +++ b/src/main/java/org/betterx/bclib/blocks/BaseWoodenButtonBlock.java @@ -3,11 +3,12 @@ package org.betterx.bclib.blocks; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.properties.BlockSetType; public class BaseWoodenButtonBlock extends BaseButtonBlock { - public BaseWoodenButtonBlock(Block source) { - super(source, Properties.copy(source).strength(0.5F, 0.5F).noOcclusion(), true); + public BaseWoodenButtonBlock(Block source, BlockSetType type) { + super(source, Properties.copy(source).strength(0.5F, 0.5F).noOcclusion(), true, type); } @Override diff --git a/src/main/java/org/betterx/bclib/blocks/StonePressurePlateBlock.java b/src/main/java/org/betterx/bclib/blocks/StonePressurePlateBlock.java index 9cd3ba24..bbaaee80 100644 --- a/src/main/java/org/betterx/bclib/blocks/StonePressurePlateBlock.java +++ b/src/main/java/org/betterx/bclib/blocks/StonePressurePlateBlock.java @@ -1,9 +1,10 @@ package org.betterx.bclib.blocks; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.properties.BlockSetType; public class StonePressurePlateBlock extends BasePressurePlateBlock { - public StonePressurePlateBlock(Block source) { - super(Sensitivity.MOBS, source); + public StonePressurePlateBlock(Block source, BlockSetType type) { + super(Sensitivity.MOBS, source, type); } } diff --git a/src/main/java/org/betterx/bclib/blocks/WoodenPressurePlateBlock.java b/src/main/java/org/betterx/bclib/blocks/WoodenPressurePlateBlock.java index 2a64768a..dec10b68 100644 --- a/src/main/java/org/betterx/bclib/blocks/WoodenPressurePlateBlock.java +++ b/src/main/java/org/betterx/bclib/blocks/WoodenPressurePlateBlock.java @@ -1,9 +1,10 @@ package org.betterx.bclib.blocks; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.properties.BlockSetType; public class WoodenPressurePlateBlock extends BasePressurePlateBlock { - public WoodenPressurePlateBlock(Block source) { - super(Sensitivity.EVERYTHING, source); + public WoodenPressurePlateBlock(Block source, BlockSetType type) { + super(Sensitivity.EVERYTHING, source, type); } } diff --git a/src/main/java/org/betterx/bclib/client/gui/screens/ProgressScreen.java b/src/main/java/org/betterx/bclib/client/gui/screens/ProgressScreen.java index e24ae5f4..bd8b10a9 100644 --- a/src/main/java/org/betterx/bclib/client/gui/screens/ProgressScreen.java +++ b/src/main/java/org/betterx/bclib/client/gui/screens/ProgressScreen.java @@ -112,6 +112,18 @@ class ProgressLogoRender extends CustomRenderComponent { ); } } + + private boolean focused; + + @Override + public boolean isFocused() { + return focused; + } + + @Override + public void setFocused(boolean bl) { + focused = bl; + } } public class ProgressScreen extends LayoutScreen implements ProgressListener, AtomicProgressListener { diff --git a/src/main/java/org/betterx/bclib/client/gui/screens/WorldSetupScreen.java b/src/main/java/org/betterx/bclib/client/gui/screens/WorldSetupScreen.java index a5b4f8e5..3ec90896 100644 --- a/src/main/java/org/betterx/bclib/client/gui/screens/WorldSetupScreen.java +++ b/src/main/java/org/betterx/bclib/client/gui/screens/WorldSetupScreen.java @@ -7,12 +7,12 @@ import org.betterx.bclib.api.v2.generator.config.BCLNetherBiomeSourceConfig; import org.betterx.bclib.api.v2.levelgen.LevelGenUtil; import org.betterx.bclib.registry.PresetsRegistry; import org.betterx.worlds.together.worldPreset.TogetherWorldPreset; -import org.betterx.worlds.together.worldPreset.WorldGenSettingsComponentAccessor; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.gui.GuiComponent; import net.minecraft.client.gui.screens.worldselection.CreateWorldScreen; import net.minecraft.client.gui.screens.worldselection.WorldCreationContext; +import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState; import net.minecraft.core.Holder; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; @@ -22,6 +22,7 @@ import net.minecraft.world.level.dimension.BuiltinDimensionTypes; import net.minecraft.world.level.dimension.DimensionType; import net.minecraft.world.level.dimension.LevelStem; import net.minecraft.world.level.levelgen.WorldDimensions; +import net.minecraft.world.level.levelgen.presets.WorldPreset; import net.minecraft.world.level.levelgen.presets.WorldPresets; import net.fabricmc.api.EnvType; @@ -34,7 +35,6 @@ import org.wunder.lib.ui.layout.values.Size; import org.wunder.lib.ui.vanilla.LayoutScreen; import java.util.Map; -import java.util.Optional; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) @@ -300,16 +300,14 @@ public class WorldSetupScreen extends LayoutScreen { updateConfiguration(LevelStem.NETHER, BuiltinDimensionTypes.NETHER, endGenerator); } - if (createWorldScreen.worldGenSettingsComponent instanceof WorldGenSettingsComponentAccessor acc - && acc.bcl_getPreset() - .isPresent() && acc.bcl_getPreset() - .get() - .value() instanceof TogetherWorldPreset worldPreset) { - acc.bcl_setPreset(Optional.of(Holder.direct( + final WorldCreationUiState acc = createWorldScreen.getUiState(); + final Holder configuredPreset = acc.getWorldType().preset(); + if (configuredPreset != null && configuredPreset.value() instanceof TogetherWorldPreset worldPreset) { + acc.setWorldType(new WorldCreationUiState.WorldTypeEntry(Holder.direct( worldPreset.withDimensions( createWorldScreen - .worldGenSettingsComponent - .settings() + .getUiState() + .getSettings() .selectedDimensions() .dimensions() ) @@ -323,7 +321,7 @@ public class WorldSetupScreen extends LayoutScreen { ResourceKey dimensionTypeKey, ChunkGenerator chunkGenerator ) { - createWorldScreen.worldGenSettingsComponent.updateSettings( + createWorldScreen.getUiState().updateDimensions( (registryAccess, worldDimensions) -> new WorldDimensions(LevelGenUtil.replaceGenerator( dimensionKey, dimensionTypeKey, @@ -359,12 +357,10 @@ public class WorldSetupScreen extends LayoutScreen { protected LayoutComponent initContent() { BCLEndBiomeSourceConfig endConfig = BCLEndBiomeSourceConfig.VANILLA; BCLNetherBiomeSourceConfig netherConfig = BCLNetherBiomeSourceConfig.VANILLA; - if (createWorldScreen.worldGenSettingsComponent instanceof WorldGenSettingsComponentAccessor acc - && acc.bcl_getPreset() - .isPresent() && acc.bcl_getPreset() - .get() - .value() instanceof TogetherWorldPreset wp) { + final WorldCreationUiState acc = createWorldScreen.getUiState(); + final Holder configuredPreset = acc.getWorldType().preset(); + if (configuredPreset.value() instanceof TogetherWorldPreset wp) { LevelStem endStem = wp.getDimension(LevelStem.END); if (endStem != null && endStem.generator().getBiomeSource() instanceof BCLibEndBiomeSource bs) { endConfig = bs.getTogetherConfig(); @@ -375,8 +371,8 @@ public class WorldSetupScreen extends LayoutScreen { } } - var netherPage = netherPage(netherConfig); - var endPage = endPage(endConfig); + LayoutComponent> netherPage = netherPage(netherConfig); + LayoutComponent> endPage = endPage(endConfig); Tabs main = new Tabs(fill(), fill()).setPadding(8, 0, 0, 0); main.addPage(Component.translatable("title.bclib.the_nether"), VerticalScroll.create(netherPage)); diff --git a/src/main/java/org/betterx/bclib/client/render/BaseSignBlockEntityRenderer.java b/src/main/java/org/betterx/bclib/client/render/BaseSignBlockEntityRenderer.java index d66563cc..a9ebf15e 100644 --- a/src/main/java/org/betterx/bclib/client/render/BaseSignBlockEntityRenderer.java +++ b/src/main/java/org/betterx/bclib/client/render/BaseSignBlockEntityRenderer.java @@ -3,7 +3,6 @@ package org.betterx.bclib.client.render; import org.betterx.bclib.blockentities.BaseSignBlockEntity; import org.betterx.bclib.blocks.BaseSignBlock; -import com.mojang.blaze3d.platform.NativeImage; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Axis; @@ -20,6 +19,7 @@ import net.minecraft.client.renderer.blockentity.SignRenderer; import net.minecraft.client.resources.model.Material; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.FastColor; import net.minecraft.util.FormattedCharSequence; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; @@ -85,10 +85,10 @@ public class BaseSignBlockEntityRenderer implements BlockEntityRenderer " + level.getBlockState(mPos)); boolean found = org.betterx.bclib.util.BlocksHelper.findSurroundingSurface( level, @@ -204,7 +204,11 @@ public class CommandRegistry { state -> BlocksHelper.isTerrain(state) ); System.out.println("Ending at: " + mPos + " -> " + level.getBlockState(mPos) + " = " + found); - org.betterx.bclib.util.BlocksHelper.setWithoutUpdate(level, new BlockPos(pos), Blocks.YELLOW_CONCRETE); + org.betterx.bclib.util.BlocksHelper.setWithoutUpdate( + level, + new BlockPos((int) pos.x, (int) pos.y, (int) pos.z), + Blocks.YELLOW_CONCRETE + ); org.betterx.bclib.util.BlocksHelper.setWithoutUpdate(level, mPos, Blocks.LIGHT_BLUE_CONCRETE); return Command.SINGLE_SUCCESS; } diff --git a/src/main/java/org/betterx/bclib/complexmaterials/BCLWoodType.java b/src/main/java/org/betterx/bclib/complexmaterials/BCLWoodType.java index a09d2de8..0712b4ad 100644 --- a/src/main/java/org/betterx/bclib/complexmaterials/BCLWoodType.java +++ b/src/main/java/org/betterx/bclib/complexmaterials/BCLWoodType.java @@ -1,12 +1,33 @@ package org.betterx.bclib.complexmaterials; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.block.state.properties.WoodType; public class BCLWoodType extends WoodType { private String modID; protected BCLWoodType(String modID, String string) { - super(string); + super(string, new BlockSetType(modID + "_" + string)); + this.modID = modID; + } + + protected BCLWoodType(String modID, String string, BlockSetType setType) { + super(string, setType); + this.modID = modID; + } + + protected BCLWoodType( + String modID, + String string, + BlockSetType setType, + SoundType soundType, + SoundType hangingSignSoundType, + SoundEvent fenceGateClose, + SoundEvent fenceGateOpen + ) { + super(string, setType, soundType, hangingSignSoundType, fenceGateClose, fenceGateOpen); this.modID = modID; } } diff --git a/src/main/java/org/betterx/bclib/complexmaterials/WoodenComplexMaterial.java b/src/main/java/org/betterx/bclib/complexmaterials/WoodenComplexMaterial.java index 3ee5cdd1..0b99681f 100644 --- a/src/main/java/org/betterx/bclib/complexmaterials/WoodenComplexMaterial.java +++ b/src/main/java/org/betterx/bclib/complexmaterials/WoodenComplexMaterial.java @@ -157,34 +157,40 @@ public class WoodenComplexMaterial extends ComplexMaterial { addBlockEntry(new BlockEntry( BLOCK_GATE, - (complexMaterial, settings) -> new BaseGateBlock(getBlock(BLOCK_PLANKS)) + (complexMaterial, settings) -> new BaseGateBlock(getBlock(BLOCK_PLANKS), this.woodType) ) .setBlockTags(BlockTags.FENCE_GATES)); addBlockEntry(new BlockEntry( BLOCK_BUTTON, - (complexMaterial, settings) -> new BaseWoodenButtonBlock(getBlock(BLOCK_PLANKS)) + (complexMaterial, settings) -> new BaseWoodenButtonBlock( + getBlock(BLOCK_PLANKS), + this.woodType.setType() + ) ) .setBlockTags(BlockTags.BUTTONS, BlockTags.WOODEN_BUTTONS) .setItemTags(ItemTags.BUTTONS, ItemTags.WOODEN_BUTTONS)); addBlockEntry(new BlockEntry( BLOCK_PRESSURE_PLATE, - (complexMaterial, settings) -> new WoodenPressurePlateBlock(getBlock(BLOCK_PLANKS)) + (complexMaterial, settings) -> new WoodenPressurePlateBlock( + getBlock(BLOCK_PLANKS), + this.woodType.setType() + ) ) .setBlockTags(BlockTags.PRESSURE_PLATES, BlockTags.WOODEN_PRESSURE_PLATES) .setItemTags(ItemTags.WOODEN_PRESSURE_PLATES)); addBlockEntry(new BlockEntry( BLOCK_TRAPDOOR, - (complexMaterial, settings) -> new BaseTrapdoorBlock(getBlock(BLOCK_PLANKS)) + (complexMaterial, settings) -> new BaseTrapdoorBlock(getBlock(BLOCK_PLANKS), this.woodType.setType()) ) .setBlockTags(BlockTags.TRAPDOORS, BlockTags.WOODEN_TRAPDOORS) .setItemTags(ItemTags.TRAPDOORS, ItemTags.WOODEN_TRAPDOORS)); addBlockEntry(new BlockEntry( BLOCK_DOOR, - (complexMaterial, settings) -> new BaseDoorBlock(getBlock(BLOCK_PLANKS)) + (complexMaterial, settings) -> new BaseDoorBlock(getBlock(BLOCK_PLANKS), this.woodType.setType()) ) .setBlockTags(BlockTags.DOORS, BlockTags.WOODEN_DOORS) .setItemTags(ItemTags.DOORS, ItemTags.WOODEN_DOORS)); diff --git a/src/main/java/org/betterx/bclib/integration/emi/EMIAbstractAlloyingRecipe.java b/src/main/java/org/betterx/bclib/integration/emi/EMIAbstractAlloyingRecipe.java index 37cdb883..e365f57d 100644 --- a/src/main/java/org/betterx/bclib/integration/emi/EMIAbstractAlloyingRecipe.java +++ b/src/main/java/org/betterx/bclib/integration/emi/EMIAbstractAlloyingRecipe.java @@ -1,5 +1,6 @@ package org.betterx.bclib.integration.emi; +import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.Container; @@ -35,7 +36,7 @@ public abstract class EMIAbstractAlloyingRecipe defaultModifiers; - public BaseArmorItem(ArmorMaterial material, EquipmentSlot equipmentSlot, Properties settings) { - super(material, equipmentSlot, settings); + public BaseArmorItem(ArmorMaterial material, Type type, Properties settings) { + super(material, type, settings); this.defaultModifiers = HashMultimap.create(); - UUID uuid = ARMOR_MODIFIER_UUID_PER_SLOT[equipmentSlot.getIndex()]; + UUID uuid = ARMOR_MODIFIER_UUID_PER_SLOT[type.getSlot().getIndex()]; addAttributeModifier( Attributes.ARMOR, new AttributeModifier(uuid, "Armor modifier", getDefense(), AttributeModifier.Operation.ADDITION) @@ -52,7 +52,7 @@ public class BaseArmorItem extends ArmorItem implements ItemModelProvider { @Override public Multimap getDefaultAttributeModifiers(EquipmentSlot equipmentSlot) { - return equipmentSlot == slot ? defaultModifiers : super.getDefaultAttributeModifiers(equipmentSlot); + return equipmentSlot == type.getSlot() ? defaultModifiers : super.getDefaultAttributeModifiers(equipmentSlot); } protected void addAttributeModifier(Attribute attribute, AttributeModifier modifier) { diff --git a/src/main/java/org/betterx/bclib/items/complex/EquipmentDescription.java b/src/main/java/org/betterx/bclib/items/complex/EquipmentDescription.java index a03e699c..39538428 100644 --- a/src/main/java/org/betterx/bclib/items/complex/EquipmentDescription.java +++ b/src/main/java/org/betterx/bclib/items/complex/EquipmentDescription.java @@ -49,13 +49,13 @@ public class EquipmentDescription { if (tool instanceof ShearsItem) { builder.setShape(" #", "# "); } else if (tool instanceof BaseArmorItem bai) { - if (bai.getSlot() == EquipmentSlot.FEET) { + if (bai.getType().getSlot() == EquipmentSlot.FEET) { builder.setShape("# #", "# #"); - } else if (bai.getSlot() == EquipmentSlot.HEAD) { + } else if (bai.getType().getSlot() == EquipmentSlot.HEAD) { builder.setShape("###", "# #"); - } else if (bai.getSlot() == EquipmentSlot.CHEST) { + } else if (bai.getType().getSlot() == EquipmentSlot.CHEST) { builder.setShape("# #", "###", "###"); - } else if (bai.getSlot() == EquipmentSlot.LEGS) { + } else if (bai.getType().getSlot() == EquipmentSlot.LEGS) { builder.setShape("###", "# #", "# #"); } else return true; } else { diff --git a/src/main/java/org/betterx/bclib/mixin/client/AnvilScreenMixin.java b/src/main/java/org/betterx/bclib/mixin/client/AnvilScreenMixin.java index 8ea93844..99bf4e0d 100644 --- a/src/main/java/org/betterx/bclib/mixin/client/AnvilScreenMixin.java +++ b/src/main/java/org/betterx/bclib/mixin/client/AnvilScreenMixin.java @@ -37,6 +37,18 @@ public class AnvilScreenMixin extends ItemCombinerScreen { super(handler, playerInventory, title, texture); } + @Override + protected void renderErrorIcon(PoseStack poseStack, int i, int j) { + if (this.hasRecipeError()) { + blit(poseStack, i + 65, j + 46, this.imageWidth, 0, 28, 21); + } + } + + private boolean hasRecipeError() { + //TODO: 1.19.4 check error conditions + return false; + } + @Inject(method = "subInit", at = @At("TAIL")) protected void be_subInit(CallbackInfo info) { int x = (width - imageWidth) / 2; diff --git a/src/main/java/org/betterx/bclib/mixin/client/GameMixin.java b/src/main/java/org/betterx/bclib/mixin/client/ClientPacketListenerMixin.java similarity index 55% rename from src/main/java/org/betterx/bclib/mixin/client/GameMixin.java rename to src/main/java/org/betterx/bclib/mixin/client/ClientPacketListenerMixin.java index bf4ba667..effe328c 100644 --- a/src/main/java/org/betterx/bclib/mixin/client/GameMixin.java +++ b/src/main/java/org/betterx/bclib/mixin/client/ClientPacketListenerMixin.java @@ -2,17 +2,17 @@ package org.betterx.bclib.mixin.client; import org.betterx.bclib.api.v2.dataexchange.DataExchangeAPI; -import net.minecraft.client.Game; +import net.minecraft.client.multiplayer.ClientPacketListener; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -@Mixin(Game.class) -public class GameMixin { +@Mixin(ClientPacketListener.class) +public class ClientPacketListenerMixin { - @Inject(method = "onStartGameSession", at = @At("TAIL")) + @Inject(method = "handleLogin", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/telemetry/WorldSessionTelemetryManager;onPlayerInfoReceived(Lnet/minecraft/world/level/GameType;Z)V")) public void bclib_onStart(CallbackInfo ci) { DataExchangeAPI.sendOnEnter(); } diff --git a/src/main/java/org/betterx/bclib/mixin/common/AnvilMenuMixin.java b/src/main/java/org/betterx/bclib/mixin/common/AnvilMenuMixin.java index 8004c532..602f1dcf 100644 --- a/src/main/java/org/betterx/bclib/mixin/common/AnvilMenuMixin.java +++ b/src/main/java/org/betterx/bclib/mixin/common/AnvilMenuMixin.java @@ -5,6 +5,7 @@ import org.betterx.bclib.blocks.LeveledAnvilBlock; import org.betterx.bclib.interfaces.AnvilScreenHandlerExtended; import org.betterx.bclib.recipes.AnvilRecipe; +import net.minecraft.client.Minecraft; import net.minecraft.core.BlockPos; import net.minecraft.tags.BlockTags; import net.minecraft.world.entity.player.Inventory; @@ -164,7 +165,7 @@ public abstract class AnvilMenuMixin extends ItemCombinerMenu implements AnvilSc private void be_updateResult() { if (be_currentRecipe == null) return; - resultSlots.setItem(0, be_currentRecipe.assemble(inputSlots)); + resultSlots.setItem(0, be_currentRecipe.assemble(inputSlots, Minecraft.getInstance().level.registryAccess())); broadcastChanges(); } diff --git a/src/main/java/org/betterx/bclib/mixin/common/BiomeSourceMixin.java b/src/main/java/org/betterx/bclib/mixin/common/BiomeSourceMixin.java index f1580e32..75e66f34 100644 --- a/src/main/java/org/betterx/bclib/mixin/common/BiomeSourceMixin.java +++ b/src/main/java/org/betterx/bclib/mixin/common/BiomeSourceMixin.java @@ -8,11 +8,7 @@ import net.minecraft.world.level.biome.BiomeSource; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import java.util.List; import java.util.Set; @Mixin(BiomeSource.class) @@ -26,14 +22,4 @@ public abstract class BiomeSourceMixin implements BiomeSourceAccessor { BCLib.LOGGER.info("Rebuilding features in BiomeSource " + this); //featuresPerStep = Suppliers.memoize(() -> FeatureSorter.buildFeaturesPerStep(this.possibleBiomes().stream().toList(), true)); } - - @Inject(method = "(Ljava/util/List;)V", at = @At("TAIL")) - public void bcl_init(List list, CallbackInfo ci) { -// System.out.println("new BiomeSource (" + Integer.toHexString(hashCode()) + ", biomes=" + possibleBiomes().size() + ")"); -// if (possibleBiomes().size() == 27) { -// System.out.println("Nether????"); -// } else if (possibleBiomes().size() == 2) { -// System.out.println("Datapack Nether???"); -// } - } } diff --git a/src/main/java/org/betterx/bclib/mixin/common/ServerLevelMixin.java b/src/main/java/org/betterx/bclib/mixin/common/ServerLevelMixin.java index b85859e9..560aa1f8 100644 --- a/src/main/java/org/betterx/bclib/mixin/common/ServerLevelMixin.java +++ b/src/main/java/org/betterx/bclib/mixin/common/ServerLevelMixin.java @@ -5,6 +5,7 @@ import org.betterx.worlds.together.world.BiomeSourceWithNoiseRelatedSettings; import org.betterx.worlds.together.world.BiomeSourceWithSeed; import net.minecraft.core.Holder; +import net.minecraft.core.RegistryAccess; import net.minecraft.resources.ResourceKey; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerLevel; @@ -34,6 +35,7 @@ public abstract class ServerLevelMixin extends Level { protected ServerLevelMixin( WritableLevelData writableLevelData, ResourceKey resourceKey, + RegistryAccess registryAccess, Holder holder, Supplier supplier, boolean bl, @@ -41,7 +43,7 @@ public abstract class ServerLevelMixin extends Level { long l, int i ) { - super(writableLevelData, resourceKey, holder, supplier, bl, bl2, l, i); + super(writableLevelData, resourceKey, registryAccess, holder, supplier, bl, bl2, l, i); } diff --git a/src/main/java/org/betterx/bclib/noise/VoronoiNoise.java b/src/main/java/org/betterx/bclib/noise/VoronoiNoise.java index 49bf43c1..80b421a9 100644 --- a/src/main/java/org/betterx/bclib/noise/VoronoiNoise.java +++ b/src/main/java/org/betterx/bclib/noise/VoronoiNoise.java @@ -135,14 +135,14 @@ public class VoronoiNoise { } BlockPos p1 = new BlockPos( - (ix + (double) selX) * scale, - (iy + (double) selY) * scale, - (iz + (double) selZ) * scale + (int) ((ix + (double) selX) * scale), + (int) ((iy + (double) selY) * scale), + (int) ((iz + (double) selZ) * scale) ); BlockPos p2 = new BlockPos( - (ix + (double) selXPre) * scale, - (iy + (double) selYPre) * scale, - (iz + (double) selZPre) * scale + (int) ((ix + (double) selXPre) * scale), + (int) ((iy + (double) selYPre) * scale), + (int) ((iz + (double) selZPre) * scale) ); return new BlockPos[]{p1, p2}; } diff --git a/src/main/java/org/betterx/bclib/recipes/AbstractAdvancementRecipe.java b/src/main/java/org/betterx/bclib/recipes/AbstractAdvancementRecipe.java index f69e4318..6765a751 100644 --- a/src/main/java/org/betterx/bclib/recipes/AbstractAdvancementRecipe.java +++ b/src/main/java/org/betterx/bclib/recipes/AbstractAdvancementRecipe.java @@ -201,10 +201,10 @@ public class AbstractAdvancementRecipe { * * @param recipe The generated recipe that need to be linked to the Advancement */ - protected void registerAdvancement(Recipe recipe) { + protected void registerAdvancement(Recipe recipe, ItemLike icon) { if (hasUnlockTrigger && generateAdvancement && advancement != null) { advancement - .startDisplay(recipe.getResultItem().getItem()) + .startDisplay(icon) .hideFromChat() .hideToast() .endDisplay() diff --git a/src/main/java/org/betterx/bclib/recipes/AbstractSimpleRecipe.java b/src/main/java/org/betterx/bclib/recipes/AbstractSimpleRecipe.java index 09158850..6107d981 100644 --- a/src/main/java/org/betterx/bclib/recipes/AbstractSimpleRecipe.java +++ b/src/main/java/org/betterx/bclib/recipes/AbstractSimpleRecipe.java @@ -97,6 +97,6 @@ public abstract class AbstractSimpleRecipe, UnknownReceipBookCateg } @Override - public ItemStack assemble(Container inv) { + public ItemStack assemble(Container inv, RegistryAccess registryAccess) { return this.output.copy(); } @@ -99,7 +100,7 @@ public class AlloyingRecipe implements Recipe, UnknownReceipBookCateg } @Override - public ItemStack getResultItem() { + public ItemStack getResultItem(RegistryAccess acc) { return this.output; } diff --git a/src/main/java/org/betterx/bclib/recipes/AnvilRecipe.java b/src/main/java/org/betterx/bclib/recipes/AnvilRecipe.java index 927b2d31..2f925f65 100644 --- a/src/main/java/org/betterx/bclib/recipes/AnvilRecipe.java +++ b/src/main/java/org/betterx/bclib/recipes/AnvilRecipe.java @@ -9,9 +9,11 @@ import org.betterx.worlds.together.tag.v3.CommonItemTags; import org.betterx.worlds.together.world.event.WorldBootstrap; import com.mojang.brigadier.exceptions.CommandSyntaxException; +import net.minecraft.client.Minecraft; import net.minecraft.core.Holder; import net.minecraft.core.NonNullList; import net.minecraft.core.Registry; +import net.minecraft.core.RegistryAccess; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.TagParser; @@ -100,7 +102,7 @@ public class AnvilRecipe implements Recipe, UnknownReceipBookCategory } @Override - public ItemStack getResultItem() { + public ItemStack getResultItem(RegistryAccess acc) { return this.output; } @@ -110,7 +112,7 @@ public class AnvilRecipe implements Recipe, UnknownReceipBookCategory } @Override - public ItemStack assemble(@NotNull Container craftingInventory) { + public ItemStack assemble(@NotNull Container craftingInventory, RegistryAccess acc) { return this.output.copy(); } @@ -155,7 +157,7 @@ public class AnvilRecipe implements Recipe, UnknownReceipBookCategory return ItemStack.EMPTY; } } - return this.assemble(craftingInventory); + return this.assemble(craftingInventory, Minecraft.getInstance().level.registryAccess()); } public boolean checkHammerDurability(Container craftingInventory, Player player) { diff --git a/src/main/java/org/betterx/bclib/recipes/FurnaceRecipe.java b/src/main/java/org/betterx/bclib/recipes/FurnaceRecipe.java index 6013a6ef..873c1b77 100644 --- a/src/main/java/org/betterx/bclib/recipes/FurnaceRecipe.java +++ b/src/main/java/org/betterx/bclib/recipes/FurnaceRecipe.java @@ -110,7 +110,7 @@ public class FurnaceRecipe extends AbstractAdvancementRecipe { time ); BCLRecipeManager.addRecipe(RecipeType.SMELTING, recipe); - registerAdvancement(recipe); + registerAdvancement(recipe, output); if (blasting) { BlastingRecipe recipe2 = new BlastingRecipe( diff --git a/src/main/java/org/betterx/bclib/recipes/GridRecipe.java b/src/main/java/org/betterx/bclib/recipes/GridRecipe.java index a1100a4c..34beeb1a 100644 --- a/src/main/java/org/betterx/bclib/recipes/GridRecipe.java +++ b/src/main/java/org/betterx/bclib/recipes/GridRecipe.java @@ -161,6 +161,6 @@ public class GridRecipe extends AbstractAdvancementRecipe { ) : new ShapelessRecipe(id, group, bookCategory, result, materials); BCLRecipeManager.addRecipe(type, recipe); - registerAdvancement(recipe); + registerAdvancement(recipe, output); } } diff --git a/src/main/java/org/betterx/bclib/recipes/SmithingTableRecipe.java b/src/main/java/org/betterx/bclib/recipes/SmithingTableRecipe.java index 22afa290..1178f420 100644 --- a/src/main/java/org/betterx/bclib/recipes/SmithingTableRecipe.java +++ b/src/main/java/org/betterx/bclib/recipes/SmithingTableRecipe.java @@ -9,10 +9,11 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeType; -import net.minecraft.world.item.crafting.UpgradeRecipe; +import net.minecraft.world.item.crafting.SmithingRecipe; +import net.minecraft.world.item.crafting.SmithingTransformRecipe; import net.minecraft.world.level.ItemLike; -public class SmithingTableRecipe extends AbstractSimpleRecipe { +public class SmithingTableRecipe extends AbstractSimpleRecipe { protected Ingredient addon; protected SmithingTableRecipe(ResourceLocation id, ItemLike output) { @@ -57,7 +58,7 @@ public class SmithingTableRecipe extends AbstractSimpleRecipe> wt_NewDefault(Optional> preset) { return Optional.of(WorldPresets.getDEFAULT()); } @@ -48,7 +49,7 @@ public class CreateWorldScreen_Mixin { //this is called when a new world is first created @Inject(method = "createNewWorldDirectory", at = @At("RETURN")) void wt_createNewWorld(CallbackInfoReturnable> cir) { - WorldBootstrap.InGUI.registryReadyOnNewWorld(this.worldGenSettingsComponent); - WorldBootstrap.InGUI.setupNewWorld(cir.getReturnValue(), this.worldGenSettingsComponent); + WorldBootstrap.InGUI.registryReadyOnNewWorld(this.getUiState().getSettings()); + WorldBootstrap.InGUI.setupNewWorld(cir.getReturnValue(), this.getUiState()); } } diff --git a/src/main/java/org/betterx/worlds/together/mixin/client/WorldGenSettingsComponentMixin.java b/src/main/java/org/betterx/worlds/together/mixin/client/WorldGenSettingsComponentMixin.java deleted file mode 100644 index a539204e..00000000 --- a/src/main/java/org/betterx/worlds/together/mixin/client/WorldGenSettingsComponentMixin.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.betterx.worlds.together.mixin.client; - -import org.betterx.worlds.together.worldPreset.WorldGenSettingsComponentAccessor; - -import net.minecraft.client.gui.screens.worldselection.WorldCreationContext; -import net.minecraft.client.gui.screens.worldselection.WorldGenSettingsComponent; -import net.minecraft.core.Holder; -import net.minecraft.world.level.levelgen.presets.WorldPreset; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.gen.Accessor; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.ModifyArg; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import java.util.LinkedList; -import java.util.List; -import java.util.Optional; -import java.util.OptionalLong; -import java.util.function.Predicate; -import java.util.stream.Collectors; - -@Mixin(WorldGenSettingsComponent.class) -public abstract class WorldGenSettingsComponentMixin implements WorldGenSettingsComponentAccessor { - @Override - @Accessor("preset") - public abstract Optional> bcl_getPreset(); - - @Override - @Accessor("preset") - public abstract void bcl_setPreset(Optional> preset); - - @Shadow - private WorldCreationContext settings; - - @Shadow - public abstract void updateSettings(WorldCreationContext.DimensionsUpdater dimensionsUpdater); - - @Shadow - private Optional> preset; - - @Inject(method = "", at = @At("TAIL")) - public void wt_init( - WorldCreationContext worldCreationContext, - Optional worldPreset, - OptionalLong seed, - CallbackInfo ci - ) { - if (this.preset.isPresent()) { - //make sure the initial dimensions are in sync with the selected World Preset - this.updateSettings((frozen, worldDimensions) -> this.preset.get().value().createWorldDimensions()); - } - } - - @ModifyArg(method = "init", index = 0, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/components/CycleButton$Builder;withValues(Ljava/util/List;Ljava/util/List;)Lnet/minecraft/client/gui/components/CycleButton$Builder;")) - public List> bcl_SortLists(List> list) { - final Predicate> vanilla = (p -> p.unwrapKey() - .orElseThrow() - .location() - .getNamespace() - .equals("minecraft")); - - - List> custom = list - .stream() - .filter(p -> !vanilla.test(p)) - .collect(Collectors.toCollection(LinkedList::new)); - - custom.addAll(list - .stream() - .filter(vanilla) - .toList()); - - return custom; - } -} diff --git a/src/main/java/org/betterx/worlds/together/world/event/AdaptWorldPresetSettingEvent.java b/src/main/java/org/betterx/worlds/together/world/event/AdaptWorldPresetSettingEvent.java index 8ba5bf68..77a6d680 100644 --- a/src/main/java/org/betterx/worlds/together/world/event/AdaptWorldPresetSettingEvent.java +++ b/src/main/java/org/betterx/worlds/together/world/event/AdaptWorldPresetSettingEvent.java @@ -4,10 +4,8 @@ import net.minecraft.core.Holder; import net.minecraft.world.level.levelgen.WorldDimensions; import net.minecraft.world.level.levelgen.presets.WorldPreset; -import java.util.Optional; - public class AdaptWorldPresetSettingEvent extends EventImpl { - public Optional> emit(Optional> start, WorldDimensions worldDims) { + public Holder emit(Holder start, WorldDimensions worldDims) { for (OnAdaptWorldPresetSettings a : handlers) { start = a.adapt(start, worldDims); } diff --git a/src/main/java/org/betterx/worlds/together/world/event/OnAdaptWorldPresetSettings.java b/src/main/java/org/betterx/worlds/together/world/event/OnAdaptWorldPresetSettings.java index 277f4057..117143af 100644 --- a/src/main/java/org/betterx/worlds/together/world/event/OnAdaptWorldPresetSettings.java +++ b/src/main/java/org/betterx/worlds/together/world/event/OnAdaptWorldPresetSettings.java @@ -4,12 +4,10 @@ import net.minecraft.core.Holder; import net.minecraft.world.level.levelgen.WorldDimensions; import net.minecraft.world.level.levelgen.presets.WorldPreset; -import java.util.Optional; - @FunctionalInterface public interface OnAdaptWorldPresetSettings { - Optional> adapt( - Optional> currentPreset, + Holder adapt( + Holder currentPreset, WorldDimensions worldDims ); } diff --git a/src/main/java/org/betterx/worlds/together/world/event/WorldBootstrap.java b/src/main/java/org/betterx/worlds/together/world/event/WorldBootstrap.java index 747be6e8..a2d3c8a9 100644 --- a/src/main/java/org/betterx/worlds/together/world/event/WorldBootstrap.java +++ b/src/main/java/org/betterx/worlds/together/world/event/WorldBootstrap.java @@ -9,10 +9,10 @@ import org.betterx.worlds.together.mixin.common.WorldPresetAccessor; import org.betterx.worlds.together.surfaceRules.SurfaceRuleUtil; import org.betterx.worlds.together.world.WorldConfig; import org.betterx.worlds.together.worldPreset.TogetherWorldPreset; -import org.betterx.worlds.together.worldPreset.WorldGenSettingsComponentAccessor; import org.betterx.worlds.together.worldPreset.WorldPresets; -import net.minecraft.client.gui.screens.worldselection.WorldGenSettingsComponent; +import net.minecraft.client.gui.screens.worldselection.WorldCreationContext; +import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState; import net.minecraft.core.Holder; import net.minecraft.core.LayeredRegistryAccess; import net.minecraft.core.Registry; @@ -94,14 +94,14 @@ public class WorldBootstrap { return dimensions; } - private static Optional> presetFromDatapack(Optional> currentPreset) { - if (currentPreset.isPresent() && LAST_REGISTRY_ACCESS != null) { - var presetKey = currentPreset.get().unwrapKey(); + private static Holder presetFromDatapack(Holder currentPreset) { + if (currentPreset != null && LAST_REGISTRY_ACCESS != null) { + Optional> presetKey = currentPreset.unwrapKey(); if (presetKey.isPresent()) { Optional> newPreset = LAST_REGISTRY_ACCESS .registryOrThrow(Registries.WORLD_PRESET) .getHolder(presetKey.get()); - if (newPreset.isPresent()) currentPreset = (Optional>) (Optional) newPreset; + currentPreset = newPreset.orElse(null); } } return currentPreset; @@ -126,7 +126,7 @@ public class WorldBootstrap { true, true ); - Optional> currentPreset = Optional.of(Helpers.defaultServerPreset()); + Holder currentPreset = Helpers.defaultServerPreset(); writeWorldPresets(dimensions, currentPreset); finishedWorldLoad(); } else { @@ -155,8 +155,8 @@ public class WorldBootstrap { } public static class InGUI { - public static void registryReadyOnNewWorld(WorldGenSettingsComponent worldGenSettingsComponent) { - Helpers.onRegistryReady(worldGenSettingsComponent.registryHolder()); + public static void registryReadyOnNewWorld(WorldCreationContext worldGenSettingsComponent) { + Helpers.onRegistryReady(worldGenSettingsComponent.worldgenLoadContext()); } public static void registryReady(RegistryAccess access) { @@ -165,22 +165,19 @@ public class WorldBootstrap { public static void setupNewWorld( Optional levelStorageAccess, - WorldGenSettingsComponent worldGenSettingsComponent + WorldCreationUiState uiState ) { + if (levelStorageAccess.isPresent()) { - if (worldGenSettingsComponent instanceof WorldGenSettingsComponentAccessor acc) { - Optional> currentPreset = acc.bcl_getPreset(); - currentPreset = Helpers.presetFromDatapack(currentPreset); - Optional> newPreset = setupNewWorldCommon( - levelStorageAccess.get(), - currentPreset, - worldGenSettingsComponent.settings().selectedDimensions() - ); - if (newPreset != currentPreset) { - acc.bcl_setPreset(newPreset); - } - } else { - WorldsTogether.LOGGER.error("Unable to access WorldGenSettingsComponent."); + Holder currentPreset = uiState.getWorldType().preset(); + currentPreset = Helpers.presetFromDatapack(currentPreset); + Holder newPreset = setupNewWorldCommon( + levelStorageAccess.get(), + currentPreset, + uiState.getSettings().selectedDimensions() + ); + if (newPreset != null && newPreset != currentPreset) { + uiState.setWorldType(new WorldCreationUiState.WorldTypeEntry(newPreset)); } } else { WorldsTogether.LOGGER.error("Unable to access Level Folder."); @@ -188,13 +185,13 @@ public class WorldBootstrap { } - static Optional> setupNewWorldCommon( + static Holder setupNewWorldCommon( LevelStorageSource.LevelStorageAccess levelStorageAccess, - Optional> currentPreset, + Holder currentPreset, WorldDimensions worldDims ) { final WorldDimensions dimensions; - if (currentPreset.map(Holder::value).orElse(null) instanceof TogetherWorldPreset t) { + if (currentPreset.value() instanceof TogetherWorldPreset t) { dimensions = t.getWorldDimensions(); } else { dimensions = TogetherWorldPreset.getWorldDimensions(net.minecraft.world.level.levelgen.presets.WorldPresets.NORMAL); @@ -251,7 +248,7 @@ public class WorldBootstrap { String levelID, WorldDimensions worldDims, LevelStorageSource levelSource, - Optional> worldPreset + Holder worldPreset ) { try { var levelStorageAccess = levelSource.createAccess(levelID); @@ -280,10 +277,10 @@ public class WorldBootstrap { } } - private static void writeWorldPresets(WorldDimensions dimensions, Optional> currentPreset) { + private static void writeWorldPresets(WorldDimensions dimensions, Holder currentPreset) { currentPreset = WorldEventsImpl.ADAPT_WORLD_PRESET.emit(currentPreset, dimensions); - if (currentPreset.map(Holder::value).orElse(null) instanceof WorldPresetAccessor acc) { + if (currentPreset != null && currentPreset.value() instanceof WorldPresetAccessor acc) { TogetherWorldPreset.writeWorldPresetSettings(acc.bcl_getDimensions()); } else { WorldsTogether.LOGGER.error("Failed writing together File"); diff --git a/src/main/java/org/betterx/worlds/together/worldPreset/WorldGenSettingsComponentAccessor.java b/src/main/java/org/betterx/worlds/together/worldPreset/WorldGenSettingsComponentAccessor.java deleted file mode 100644 index 6cb12e14..00000000 --- a/src/main/java/org/betterx/worlds/together/worldPreset/WorldGenSettingsComponentAccessor.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.betterx.worlds.together.worldPreset; - -import net.minecraft.core.Holder; -import net.minecraft.world.level.levelgen.presets.WorldPreset; - -import java.util.Optional; - -public interface WorldGenSettingsComponentAccessor { - Optional> bcl_getPreset(); - void bcl_setPreset(Optional> preset); -} diff --git a/src/main/java/org/betterx/worlds/together/worldPreset/WorldPresets.java b/src/main/java/org/betterx/worlds/together/worldPreset/WorldPresets.java index 08e68141..4b6a3264 100644 --- a/src/main/java/org/betterx/worlds/together/worldPreset/WorldPresets.java +++ b/src/main/java/org/betterx/worlds/together/worldPreset/WorldPresets.java @@ -11,10 +11,7 @@ import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstapContext; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.level.biome.Biome; -import net.minecraft.world.level.biome.BiomeSource; -import net.minecraft.world.level.biome.MultiNoiseBiomeSource; -import net.minecraft.world.level.biome.TheEndBiomeSource; +import net.minecraft.world.level.biome.*; import net.minecraft.world.level.chunk.ChunkGenerator; import net.minecraft.world.level.dimension.BuiltinDimensionTypes; import net.minecraft.world.level.dimension.DimensionType; @@ -69,7 +66,10 @@ public class WorldPresets { public final WorldGenUtil.Context netherContext; public final WorldGenUtil.Context endContext; + public final HolderGetter parameterLists; + public BootstrapData(BootstapContext bootstapContext) { + this.parameterLists = bootstapContext.lookup(Registries.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST); final HolderGetter dimensionTypes = bootstapContext.lookup(Registries.DIMENSION_TYPE); this.noiseSettings = bootstapContext.lookup(Registries.NOISE_SETTINGS); @@ -78,16 +78,20 @@ public class WorldPresets { this.structureSets = bootstapContext.lookup(Registries.STRUCTURE_SET); this.overworldDimensionType = dimensionTypes.getOrThrow(BuiltinDimensionTypes.OVERWORLD); - MultiNoiseBiomeSource overworldBiomeSource = MultiNoiseBiomeSource.Preset.OVERWORLD.biomeSource(this.biomes); + Holder.Reference overworldParameters = parameterLists + .getOrThrow(MultiNoiseBiomeSourceParameterLists.OVERWORLD); + MultiNoiseBiomeSource overworldBiomeSource = MultiNoiseBiomeSource.createFromPreset(overworldParameters); Holder defaultOverworldNoise = this.noiseSettings.getOrThrow(NoiseGeneratorSettings.OVERWORLD); this.overworldStem = makeNoiseBasedOverworld(overworldBiomeSource, defaultOverworldNoise); this.netherDimensionType = dimensionTypes.getOrThrow(BuiltinDimensionTypes.NETHER); + Holder.Reference netherParameters = parameterLists + .getOrThrow(MultiNoiseBiomeSourceParameterLists.NETHER); Holder defaultNetherNoise = this.noiseSettings.getOrThrow(NoiseGeneratorSettings.NETHER); this.netherStem = new LevelStem( netherDimensionType, new NoiseBasedChunkGenerator( - MultiNoiseBiomeSource.Preset.NETHER.biomeSource(this.biomes), + MultiNoiseBiomeSource.createFromPreset(netherParameters), defaultNetherNoise ) ); diff --git a/src/main/resources/bclib.accesswidener b/src/main/resources/bclib.accesswidener index 60431056..90bc1787 100644 --- a/src/main/resources/bclib.accesswidener +++ b/src/main/resources/bclib.accesswidener @@ -10,13 +10,13 @@ accessible class net/minecraft/world/level/levelgen/SurfaceRules$LazyCondition accessible class net/minecraft/world/level/levelgen/SurfaceRules$SequenceRuleSource accessible class net/minecraft/world/level/levelgen/presets/WorldPresets$Bootstrap extendable class net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator -accessible class net/minecraft/core/registries/BuiltInRegistries$RegistryBootstrap -accessible class net/minecraft/world/level/levelgen/SurfaceRules$SequenceRuleSource -accessible class net/minecraft/server/dedicated/DedicatedServerProperties$WorldDimensionData -accessible class net/minecraft/client/resources/model/AtlasSet$AtlasEntry +accessible class net/minecraft/core/registries/BuiltInRegistries$RegistryBootstrap +accessible class net/minecraft/world/level/levelgen/SurfaceRules$SequenceRuleSource +accessible class net/minecraft/server/dedicated/DedicatedServerProperties$WorldDimensionData +accessible class net/minecraft/client/resources/model/AtlasSet$AtlasEntry +extendable class net/minecraft/world/level/block/state/properties/WoodType #Methods -accessible method net/minecraft/client/gui/screens/worldselection/WorldGenSettingsComponent updateSettings (Lnet/minecraft/client/gui/screens/worldselection/WorldCreationContext$DimensionsUpdater;)V accessible method net/minecraft/world/level/storage/loot/LootPool ([Lnet/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer;[Lnet/minecraft/world/level/storage/loot/predicates/LootItemCondition;[Lnet/minecraft/world/level/storage/loot/functions/LootItemFunction;Lnet/minecraft/world/level/storage/loot/providers/number/NumberProvider;Lnet/minecraft/world/level/storage/loot/providers/number/NumberProvider;)V accessible method net/minecraft/world/entity/ai/village/poi/PoiTypes register (Lnet/minecraft/core/Registry;Lnet/minecraft/resources/ResourceKey;Ljava/util/Set;II)Lnet/minecraft/world/entity/ai/village/poi/PoiType; accessible method net/minecraft/world/level/levelgen/SurfaceRules$SequenceRuleSource (Ljava/util/List;)V diff --git a/src/main/resources/bclib.mixins.client.json b/src/main/resources/bclib.mixins.client.json index 5d50574b..a541aade 100644 --- a/src/main/resources/bclib.mixins.client.json +++ b/src/main/resources/bclib.mixins.client.json @@ -7,9 +7,9 @@ "AnvilScreenMixin", "AtlasSetMixin", "BlockMixin", + "ClientPacketListenerMixin", "ClientRecipeBookMixin", "FogRendererMixin", - "GameMixin", "MinecraftMixin", "ModelManagerMixin", "PresetEditorMixin", diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 703100e8..ec989ca5 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -46,10 +46,10 @@ "bclib.mixins.client.json" ], "depends": { - "fabricloader": ">=0.14.11", - "fabric": ">=0.68.1", + "fabricloader": ">=0.14.19", + "fabric": ">=0.77.0", "minecraft": [ - "1.19.3" + "1.19.4" ] }, "custom": { diff --git a/src/main/resources/together.mixins.client.json b/src/main/resources/together.mixins.client.json index 872ff870..1242053e 100644 --- a/src/main/resources/together.mixins.client.json +++ b/src/main/resources/together.mixins.client.json @@ -5,7 +5,6 @@ "compatibilityLevel": "JAVA_17", "client": [ "CreateWorldScreen_Mixin", - "WorldGenSettingsComponentMixin", "WorldOpenFlowsMixin" ], "injectors": {