From 751d0aff081a2db07b3a4da667e4f3b6b88b47b8 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Fri, 24 Mar 2023 18:42:23 +0200 Subject: [PATCH] Port to 1.19.4 --- gradle.properties | 12 ++++----- .../woodsandmires/data/builtin/WamBiomes.java | 25 +++++++++---------- .../data/builtin/WamPlacedFeatures.java | 5 ++-- .../woods_and_mires/worldgen/biome/fell.json | 2 +- .../worldgen/biome/lush_pine_forest.json | 2 +- .../biome/old_growth_pine_forest.json | 2 +- .../worldgen/biome/pine_forest.json | 2 +- .../worldgen/biome/pine_mire.json | 2 +- .../worldgen/biome/piny_grove.json | 2 +- .../worldgen/biome/snowy_fell.json | 2 +- .../worldgen/biome/snowy_pine_forest.json | 2 +- .../juuxel/woodsandmires/WoodsAndMires.java | 6 +++-- .../woodsandmires/block/WamBlockSetTypes.java | 16 ++++++++++++ .../juuxel/woodsandmires/block/WamBlocks.java | 17 ++++++------- .../woodsandmires/block/WamSignBlock.java | 6 ++--- .../woodsandmires/block/WamSignTypes.java | 16 ------------ .../woodsandmires/block/WamWallSignBlock.java | 6 ++--- .../woodsandmires/block/WamWoodTypes.java | 17 +++++++++++++ src/main/resources/fabric.mod.json | 10 ++++---- .../resources/woods_and_mires.accesswidener | 2 +- 20 files changed, 85 insertions(+), 69 deletions(-) create mode 100644 src/main/java/juuxel/woodsandmires/block/WamBlockSetTypes.java delete mode 100644 src/main/java/juuxel/woodsandmires/block/WamSignTypes.java create mode 100644 src/main/java/juuxel/woodsandmires/block/WamWoodTypes.java diff --git a/gradle.properties b/gradle.properties index d97fe04..471c0bf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop/ -minecraft_version = 1.19.3 -yarn_mappings = 1.19.3+build.5 -loader_version = 0.14.16 +minecraft_version = 1.19.4 +yarn_mappings = 1.19.4+build.1 +loader_version = 0.14.18 # Mod Properties -mod_version = 2.0.1 +mod_version = 2.0.2 maven_group = io.github.juuxel archives_base_name = WoodsAndMires # Dependencies -fabric_version = 0.75.1+1.19.3 -terrablender_version = 1.19.3-2.1.0.134 +fabric_version = 0.76.0+1.19.4 +terrablender_version = 1.19.4-2.2.0.154 typesafe_config_version = 1.4.2 diff --git a/src/data/java/juuxel/woodsandmires/data/builtin/WamBiomes.java b/src/data/java/juuxel/woodsandmires/data/builtin/WamBiomes.java index 766b1fe..3525e5e 100644 --- a/src/data/java/juuxel/woodsandmires/data/builtin/WamBiomes.java +++ b/src/data/java/juuxel/woodsandmires/data/builtin/WamBiomes.java @@ -23,6 +23,9 @@ import java.util.function.Consumer; public final class WamBiomes { + // See Biome.doesNotSnow (1.19.4) + private static final float WARM_BIOME_MINIMUM_TEMPERATURE = 0.15f; + private final Registerable registerable; private WamBiomes(Registerable registerable) { @@ -52,7 +55,7 @@ private static int getSkyColor(float temperature) { return OverworldBiomeCreator.getSkyColor(temperature); } - private Biome pineForest(Biome.Precipitation precipitation, float temperature, + private Biome pineForest(float temperature, Consumer earlyGenerationSettingsConfigurator, Consumer generationSettingsConfigurator) { GenerationSettings generationSettings = generationSettings(builder -> { @@ -69,7 +72,7 @@ private Biome pineForest(Biome.Precipitation precipitation, float temperature, generationSettingsConfigurator.accept(builder); - if (precipitation != Biome.Precipitation.SNOW) { + if (temperature >= WARM_BIOME_MINIMUM_TEMPERATURE) { DefaultBiomeFeatures.addDefaultFlowers(builder); builder.feature(GenerationStep.Feature.VEGETAL_DECORATION, WamPlacedFeatureKeys.PINE_FOREST_HEATHER_PATCH); } @@ -98,7 +101,6 @@ private Biome pineForest(Biome.Precipitation precipitation, float temperature, .moodSound(BiomeMoodSound.CAVE) .build() ) - .precipitation(precipitation) .downfall(0.6f) .temperature(temperature) .generationSettings(generationSettings) @@ -108,26 +110,26 @@ private Biome pineForest(Biome.Precipitation precipitation, float temperature, private Biome pineForest() { // noinspection CodeBlock2Expr - return pineForest(Biome.Precipitation.RAIN, 0.6f, builder -> {}, builder -> { + return pineForest(0.6f, builder -> {}, builder -> { builder.feature(GenerationStep.Feature.VEGETAL_DECORATION, WamPlacedFeatureKeys.FOREST_PINE); }); } private Biome snowyPineForest() { // noinspection CodeBlock2Expr - return pineForest(Biome.Precipitation.SNOW, 0f, builder -> {}, builder -> { + return pineForest(0f, builder -> {}, builder -> { builder.feature(GenerationStep.Feature.VEGETAL_DECORATION, WamPlacedFeatureKeys.SNOWY_PINE_FOREST_TREES); }); } private Biome oldGrowthPineForest() { - return pineForest(Biome.Precipitation.RAIN, 0.4f, builder -> {}, builder -> { + return pineForest(0.4f, builder -> {}, builder -> { builder.feature(GenerationStep.Feature.VEGETAL_DECORATION, WamPlacedFeatureKeys.OLD_GROWTH_PINE_FOREST_TREES); }); } private Biome lushPineForest() { - return pineForest(Biome.Precipitation.RAIN, 0.6f, builder -> { + return pineForest(0.6f, builder -> { DefaultBiomeFeatures.addSavannaTallGrass(builder); }, builder -> { builder.feature(GenerationStep.Feature.VEGETAL_DECORATION, WamPlacedFeatureKeys.LUSH_PINE_FOREST_TREES); @@ -164,7 +166,6 @@ private Biome pineMire() { .skyColor(getSkyColor(0.6f)) .build() ) - .precipitation(Biome.Precipitation.RAIN) .downfall(0.9f) .temperature(0.6f) .generationSettings(generationSettings) @@ -172,7 +173,7 @@ private Biome pineMire() { .build(); } - private Biome fell(Biome.Precipitation precipitation, float temperature, Consumer generationSettingsConfigurator) { + private Biome fell(float temperature, Consumer generationSettingsConfigurator) { SpawnSettings spawnSettings = spawnSettings(builder -> { DefaultBiomeFeatures.addBatsAndMonsters(builder); @@ -196,7 +197,6 @@ private Biome fell(Biome.Precipitation precipitation, float temperature, Consume .moodSound(BiomeMoodSound.CAVE) .build() ) - .precipitation(precipitation) .downfall(0.7f) .temperature(temperature) .generationSettings(generationSettings) @@ -205,7 +205,7 @@ private Biome fell(Biome.Precipitation precipitation, float temperature, Consume } private Biome fell() { - return fell(Biome.Precipitation.RAIN, 0.25f, builder -> { + return fell(0.25f, builder -> { DefaultBiomeFeatures.addDefaultFlowers(builder); builder.feature(GenerationStep.Feature.VEGETAL_DECORATION, WamPlacedFeatureKeys.FELL_HEATHER_PATCH); DefaultBiomeFeatures.addForestGrass(builder); @@ -222,7 +222,7 @@ private Biome fell() { } private Biome snowyFell() { - return fell(Biome.Precipitation.SNOW, 0f, builder -> { + return fell(0f, builder -> { builder.feature(GenerationStep.Feature.LOCAL_MODIFICATIONS, WamPlacedFeatureKeys.FELL_BOULDER); builder.feature(GenerationStep.Feature.LAKES, WamPlacedFeatureKeys.FELL_POND); builder.feature(GenerationStep.Feature.SURFACE_STRUCTURES, WamPlacedFeatureKeys.FROZEN_TREASURE); @@ -257,7 +257,6 @@ private Biome pinyGrove() { .moodSound(BiomeMoodSound.CAVE) .build() ) - .precipitation(Biome.Precipitation.SNOW) .downfall(0.8f) .temperature(-0.2f) .generationSettings(generationSettings) diff --git a/src/data/java/juuxel/woodsandmires/data/builtin/WamPlacedFeatures.java b/src/data/java/juuxel/woodsandmires/data/builtin/WamPlacedFeatures.java index bc3e108..8b978af 100644 --- a/src/data/java/juuxel/woodsandmires/data/builtin/WamPlacedFeatures.java +++ b/src/data/java/juuxel/woodsandmires/data/builtin/WamPlacedFeatures.java @@ -10,7 +10,6 @@ import net.minecraft.registry.RegistryEntryLookup; import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; -import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.util.math.intprovider.ClampedIntProvider; import net.minecraft.util.math.intprovider.UniformIntProvider; import net.minecraft.world.gen.feature.ConfiguredFeature; @@ -31,7 +30,7 @@ private static List cons(PlacementModifier head, List treeModifiers(PlacementModifier countModifier) { - return VegetationPlacedFeatures.modifiers(countModifier); + return VegetationPlacedFeatures.treeModifiers(countModifier); } private static List countExtraTreeModifiers(int count, float extraChance, int extraCount) { @@ -39,7 +38,7 @@ private static List countExtraTreeModifiers(int count, float } private static List treeModifiersWithWouldSurvive(PlacementModifier countModifier, Block block) { - return VegetationPlacedFeatures.modifiersWithWouldSurvive(countModifier, block); + return VegetationPlacedFeatures.treeModifiersWithWouldSurvive(countModifier, block); } private static List countModifiers(int count) { diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/fell.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/fell.json index f052b04..2123fdf 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/fell.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/fell.json @@ -89,7 +89,7 @@ "minecraft:freeze_top_layer" ] ], - "precipitation": "rain", + "has_precipitation": true, "spawn_costs": {}, "spawners": { "ambient": [ diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json index 54235df..7d8ec41 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json @@ -93,7 +93,7 @@ "minecraft:freeze_top_layer" ] ], - "precipitation": "rain", + "has_precipitation": true, "spawn_costs": {}, "spawners": { "ambient": [ diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/old_growth_pine_forest.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/old_growth_pine_forest.json index a3897c5..898b5f8 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/old_growth_pine_forest.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/old_growth_pine_forest.json @@ -90,7 +90,7 @@ "minecraft:freeze_top_layer" ] ], - "precipitation": "rain", + "has_precipitation": true, "spawn_costs": {}, "spawners": { "ambient": [ diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_forest.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_forest.json index d921d2d..7d6d472 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_forest.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_forest.json @@ -90,7 +90,7 @@ "minecraft:freeze_top_layer" ] ], - "precipitation": "rain", + "has_precipitation": true, "spawn_costs": {}, "spawners": { "ambient": [ diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_mire.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_mire.json index 57d8560..2d129b2 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_mire.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_mire.json @@ -65,7 +65,7 @@ "woods_and_mires:mire_meadow" ] ], - "precipitation": "rain", + "has_precipitation": true, "spawn_costs": {}, "spawners": { "ambient": [ diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/piny_grove.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/piny_grove.json index 8e6426c..521c239 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/piny_grove.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/piny_grove.json @@ -83,7 +83,7 @@ "minecraft:freeze_top_layer" ] ], - "precipitation": "snow", + "has_precipitation": true, "spawn_costs": {}, "spawners": { "ambient": [ diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/snowy_fell.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/snowy_fell.json index e3b6173..9b8d759 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/snowy_fell.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/snowy_fell.json @@ -80,7 +80,7 @@ "minecraft:freeze_top_layer" ] ], - "precipitation": "snow", + "has_precipitation": true, "spawn_costs": {}, "spawners": { "ambient": [ diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/snowy_pine_forest.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/snowy_pine_forest.json index 68e2363..bfe5bc0 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/snowy_pine_forest.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/snowy_pine_forest.json @@ -88,7 +88,7 @@ "minecraft:freeze_top_layer" ] ], - "precipitation": "snow", + "has_precipitation": true, "spawn_costs": {}, "spawners": { "ambient": [ diff --git a/src/main/java/juuxel/woodsandmires/WoodsAndMires.java b/src/main/java/juuxel/woodsandmires/WoodsAndMires.java index ad0e2fe..03c536e 100644 --- a/src/main/java/juuxel/woodsandmires/WoodsAndMires.java +++ b/src/main/java/juuxel/woodsandmires/WoodsAndMires.java @@ -1,8 +1,9 @@ package juuxel.woodsandmires; import juuxel.woodsandmires.biome.WamBiomeModifications; +import juuxel.woodsandmires.block.WamBlockSetTypes; import juuxel.woodsandmires.block.WamBlocks; -import juuxel.woodsandmires.block.WamSignTypes; +import juuxel.woodsandmires.block.WamWoodTypes; import juuxel.woodsandmires.block.entity.WamBlockEntities; import juuxel.woodsandmires.config.WamConfig; import juuxel.woodsandmires.dev.WamDev; @@ -23,7 +24,8 @@ public static Identifier id(String path) { @Override public void onInitialize() { WamConfig.load(); - WamSignTypes.init(); + WamBlockSetTypes.init(); + WamWoodTypes.init(); WamBlocks.init(); WamBlockEntities.register(); WamItemGroups.init(); diff --git a/src/main/java/juuxel/woodsandmires/block/WamBlockSetTypes.java b/src/main/java/juuxel/woodsandmires/block/WamBlockSetTypes.java new file mode 100644 index 0000000..b43c09f --- /dev/null +++ b/src/main/java/juuxel/woodsandmires/block/WamBlockSetTypes.java @@ -0,0 +1,16 @@ +package juuxel.woodsandmires.block; + +import juuxel.woodsandmires.WoodsAndMires; +import net.fabricmc.fabric.api.object.builder.v1.block.type.BlockSetTypeRegistry; +import net.minecraft.block.BlockSetType; + +public final class WamBlockSetTypes { + public static final BlockSetType PINE = registerWood("pine"); + + public static void init() { + } + + private static BlockSetType registerWood(String id) { + return BlockSetTypeRegistry.registerWood(WoodsAndMires.id(id)); + } +} diff --git a/src/main/java/juuxel/woodsandmires/block/WamBlocks.java b/src/main/java/juuxel/woodsandmires/block/WamBlocks.java index b7c8efb..663ca8a 100644 --- a/src/main/java/juuxel/woodsandmires/block/WamBlocks.java +++ b/src/main/java/juuxel/woodsandmires/block/WamBlocks.java @@ -29,7 +29,6 @@ import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.sound.BlockSoundGroup; -import net.minecraft.sound.SoundEvents; import org.jetbrains.annotations.Nullable; import java.util.function.Supplier; @@ -41,14 +40,14 @@ public final class WamBlocks { public static final Block PINE_SLAB = new SlabBlock(copyWoodSettings(Blocks.OAK_SLAB)); public static final Block PINE_STAIRS = new StairsBlock(PINE_PLANKS.getDefaultState(), copyWoodSettings(Blocks.OAK_STAIRS)); public static final Block PINE_FENCE = new FenceBlock(copyWoodSettings(Blocks.OAK_FENCE)); - public static final Block PINE_FENCE_GATE = new FenceGateBlock(copyWoodSettings(Blocks.OAK_FENCE_GATE), SoundEvents.BLOCK_FENCE_GATE_CLOSE, SoundEvents.BLOCK_FENCE_GATE_OPEN); - public static final Block PINE_DOOR = new DoorBlock(copyWoodSettings(Blocks.OAK_DOOR), SoundEvents.BLOCK_WOODEN_DOOR_CLOSE, SoundEvents.BLOCK_WOODEN_DOOR_OPEN); - public static final Block PINE_TRAPDOOR = new TrapdoorBlock(copyWoodSettings(Blocks.OAK_DOOR), SoundEvents.BLOCK_WOODEN_TRAPDOOR_CLOSE, SoundEvents.BLOCK_WOODEN_TRAPDOOR_OPEN); - public static final Block PINE_BUTTON = Blocks.createWoodenButtonBlock(); - public static final Block PINE_PRESSURE_PLATE = new PressurePlateBlock(PressurePlateBlock.ActivationRule.EVERYTHING, copyWoodSettings(Blocks.OAK_PRESSURE_PLATE), SoundEvents.BLOCK_WOODEN_PRESSURE_PLATE_CLICK_OFF, SoundEvents.BLOCK_WOODEN_PRESSURE_PLATE_CLICK_ON); - public static final Block PINE_SIGN = new WamSignBlock(copyWoodSettings(Blocks.OAK_SIGN), WamSignTypes.PINE); + public static final Block PINE_FENCE_GATE = new FenceGateBlock(copyWoodSettings(Blocks.OAK_FENCE_GATE), WamWoodTypes.PINE); + public static final Block PINE_DOOR = new DoorBlock(copyWoodSettings(Blocks.OAK_DOOR), WamBlockSetTypes.PINE); + public static final Block PINE_TRAPDOOR = new TrapdoorBlock(copyWoodSettings(Blocks.OAK_DOOR), WamBlockSetTypes.PINE); + public static final Block PINE_BUTTON = Blocks.createWoodenButtonBlock(WamBlockSetTypes.PINE); + public static final Block PINE_PRESSURE_PLATE = new PressurePlateBlock(PressurePlateBlock.ActivationRule.EVERYTHING, copyWoodSettings(Blocks.OAK_PRESSURE_PLATE), WamBlockSetTypes.PINE); + public static final Block PINE_SIGN = new WamSignBlock(copyWoodSettings(Blocks.OAK_SIGN), WamWoodTypes.PINE); // We have to evaluate this *after* PINE_SIGN has registered due to the loot table condition. - public static final Supplier PINE_WALL_SIGN = Suppliers.memoize(() -> new WamWallSignBlock(copyWoodSettings(PINE_SIGN).dropsLike(PINE_SIGN), WamSignTypes.PINE)); + public static final Supplier PINE_WALL_SIGN = Suppliers.memoize(() -> new WamWallSignBlock(copyWoodSettings(PINE_SIGN).dropsLike(PINE_SIGN), WamWoodTypes.PINE)); public static final Block PINE_LEAVES = Blocks.createLeavesBlock(BlockSoundGroup.GRASS); public static final Block PINE_SAPLING = new SaplingBlock(new PineSaplingGenerator(), AbstractBlock.Settings.copy(Blocks.OAK_SAPLING)); public static final Block POTTED_PINE_SAPLING = new FlowerPotBlock(PINE_SAPLING, createFlowerPotSettings()); @@ -63,7 +62,7 @@ public final class WamBlocks { public static final Block FIREWEED = new TallFlowerBlock(createFlowerSettings(true)); public static final Block TANSY = new BigFlowerBlock(StatusEffects.SLOW_FALLING, 10, createFlowerSettings(false)); public static final Block POTTED_TANSY = new FlowerPotBlock(TANSY, createFlowerPotSettings()); - public static final Block FELL_LICHEN = new LichenBlock(createFlowerSettings(false).mapColor(MapColor.OFF_WHITE).offsetType(AbstractBlock.OffsetType.XZ)); + public static final Block FELL_LICHEN = new LichenBlock(createFlowerSettings(false).mapColor(MapColor.OFF_WHITE).offset(AbstractBlock.OffsetType.XZ)); public static final Block POTTED_FELL_LICHEN = new FlowerPotBlock(FELL_LICHEN, createFlowerPotSettings()); public static final Block HEATHER = new HeatherBlock(StatusEffects.REGENERATION, 8, createFlowerSettings(false)); public static final Block POTTED_HEATHER = new FlowerPotBlock(HEATHER, createFlowerPotSettings()); diff --git a/src/main/java/juuxel/woodsandmires/block/WamSignBlock.java b/src/main/java/juuxel/woodsandmires/block/WamSignBlock.java index af831ef..2eedc32 100644 --- a/src/main/java/juuxel/woodsandmires/block/WamSignBlock.java +++ b/src/main/java/juuxel/woodsandmires/block/WamSignBlock.java @@ -3,13 +3,13 @@ import juuxel.woodsandmires.block.entity.WamSignBlockEntity; import net.minecraft.block.BlockState; import net.minecraft.block.SignBlock; +import net.minecraft.block.WoodType; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.util.SignType; import net.minecraft.util.math.BlockPos; public class WamSignBlock extends SignBlock { - public WamSignBlock(Settings settings, SignType signType) { - super(settings, signType); + public WamSignBlock(Settings settings, WoodType woodType) { + super(settings, woodType); } @Override diff --git a/src/main/java/juuxel/woodsandmires/block/WamSignTypes.java b/src/main/java/juuxel/woodsandmires/block/WamSignTypes.java deleted file mode 100644 index 2c48644..0000000 --- a/src/main/java/juuxel/woodsandmires/block/WamSignTypes.java +++ /dev/null @@ -1,16 +0,0 @@ -package juuxel.woodsandmires.block; - -import juuxel.woodsandmires.WoodsAndMires; -import net.fabricmc.fabric.api.object.builder.v1.sign.SignTypeRegistry; -import net.minecraft.util.SignType; - -public final class WamSignTypes { - public static final SignType PINE = register("pine"); - - public static void init() { - } - - private static SignType register(String id) { - return SignTypeRegistry.registerSignType(WoodsAndMires.id(id)); - } -} diff --git a/src/main/java/juuxel/woodsandmires/block/WamWallSignBlock.java b/src/main/java/juuxel/woodsandmires/block/WamWallSignBlock.java index f9535fb..a6e1e46 100644 --- a/src/main/java/juuxel/woodsandmires/block/WamWallSignBlock.java +++ b/src/main/java/juuxel/woodsandmires/block/WamWallSignBlock.java @@ -3,13 +3,13 @@ import juuxel.woodsandmires.block.entity.WamSignBlockEntity; import net.minecraft.block.BlockState; import net.minecraft.block.WallSignBlock; +import net.minecraft.block.WoodType; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.util.SignType; import net.minecraft.util.math.BlockPos; public class WamWallSignBlock extends WallSignBlock { - public WamWallSignBlock(Settings settings, SignType signType) { - super(settings, signType); + public WamWallSignBlock(Settings settings, WoodType woodType) { + super(settings, woodType); } @Override diff --git a/src/main/java/juuxel/woodsandmires/block/WamWoodTypes.java b/src/main/java/juuxel/woodsandmires/block/WamWoodTypes.java new file mode 100644 index 0000000..28ec615 --- /dev/null +++ b/src/main/java/juuxel/woodsandmires/block/WamWoodTypes.java @@ -0,0 +1,17 @@ +package juuxel.woodsandmires.block; + +import juuxel.woodsandmires.WoodsAndMires; +import net.fabricmc.fabric.api.object.builder.v1.block.type.WoodTypeRegistry; +import net.minecraft.block.BlockSetType; +import net.minecraft.block.WoodType; + +public final class WamWoodTypes { + public static final WoodType PINE = register("pine", WamBlockSetTypes.PINE); + + public static void init() { + } + + private static WoodType register(String id, BlockSetType blockSetType) { + return WoodTypeRegistry.register(WoodsAndMires.id(id), blockSetType); + } +} diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index eeb2583..a3ca83e 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -30,12 +30,12 @@ "accessWidener": "woods_and_mires.accesswidener", "depends": { - "fabricloader": ">=0.14.6", - "fabric": ">=0.75.1", - "fabric-biome-api-v1": "^12.1.0", - "minecraft": "~1.19.3" + "fabricloader": ">=0.14.18", + "fabric": ">=0.76.0", + "fabric-biome-api-v1": "^13.0.0", + "minecraft": "~1.19.4" }, "recommends": { - "terrablender": "~2.1" + "terrablender": "~2.2" } } diff --git a/src/main/resources/woods_and_mires.accesswidener b/src/main/resources/woods_and_mires.accesswidener index 86979bc..f32f6d7 100644 --- a/src/main/resources/woods_and_mires.accesswidener +++ b/src/main/resources/woods_and_mires.accesswidener @@ -2,7 +2,7 @@ accessWidener v1 named # Blocks accessible method net/minecraft/block/Blocks createLeavesBlock (Lnet/minecraft/sound/BlockSoundGroup;)Lnet/minecraft/block/LeavesBlock; -accessible method net/minecraft/block/Blocks createWoodenButtonBlock ()Lnet/minecraft/block/ButtonBlock; +accessible method net/minecraft/block/Blocks createWoodenButtonBlock (Lnet/minecraft/block/BlockSetType;)Lnet/minecraft/block/ButtonBlock; # World gen accessible field net/minecraft/world/biome/OverworldBiomeCreator DEFAULT_WATER_COLOR I