From f3411a1e8e2cd746e80496743979937bc2268996 Mon Sep 17 00:00:00 2001 From: Treetrain1 Date: Wed, 27 Dec 2023 13:57:26 -0600 Subject: [PATCH 1/4] random possible compat fix --- .../java/net/frozenblock/wilderwild/block/BaobabNutBlock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/frozenblock/wilderwild/block/BaobabNutBlock.java b/src/main/java/net/frozenblock/wilderwild/block/BaobabNutBlock.java index 88874be5ff..384cb49dc8 100644 --- a/src/main/java/net/frozenblock/wilderwild/block/BaobabNutBlock.java +++ b/src/main/java/net/frozenblock/wilderwild/block/BaobabNutBlock.java @@ -59,7 +59,7 @@ public class BaobabNutBlock extends SaplingBlock { public BaobabNutBlock(@NotNull BlockBehaviour.Properties settings) { super(WWTreeGrowers.BAOBAB, settings); - this.registerDefaultState(this.stateDefinition.any().setValue(STAGE, 0).setValue(AGE, 0).setValue(HANGING, false)); + this.registerDefaultState(this.defaultBlockState().setValue(AGE, 0).setValue(HANGING, false)); } private static boolean isHanging(@NotNull BlockState state) { From b2676b285e9f5ba710efa315f70001adbf9980cd Mon Sep 17 00:00:00 2001 From: AViewFromTheTop <87103914+AViewFromTheTop@users.noreply.github.com> Date: Thu, 28 Dec 2023 16:11:52 -0500 Subject: [PATCH 2/4] IMPORTANT TAG FIX --- CHANGELOG.md | 15 +-------------- gradle.properties | 2 +- .../blocks/mangrove_roots_can_grow_through.json | 1 + .../tags/blocks/overworld_natural_logs.json | 1 + .../data/minecraft/tags/items/logs_that_burn.json | 1 + .../tags/items/overworld_natural_logs.json | 1 + 6 files changed, 6 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3baef6668b..711bb5d251 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,17 +2,4 @@ Please clear changelog after each release. Thank you! ----------------- -- Fixed Crabs not dropping cooked crab claws when killed whilst on fire -- Updated the Crab's digging and emerging sounds to sound slightly more Minecrafty -- Stopped Crabs from moving when they aren't supposed to -- Renamed the `wilderwild:crab_tempt_items` tag to `wilderwild:crab_food` -- Fixed the Looting enchantment not affecting the Crab claw loot table -- Fixed Display Lanterns not properly saving Fireflies to the item when broken with Silk Touch, and not spawning Fireflies upon breaking without Silk Touch -- Fixed log spam of the Enderman anger sound predicate -- Fixed tags on 1.20.4 -- Fixed potted grass loot table on 1.20.4 -- Fixed compat with Simple Copper Pipes to now work 100% of the time - - Requires Simple Copper Pipes 1.16+ (compat id 3) -- Removed embedded Reach Entity Attributes on 1.20.5 -- Updated embedded FrozenLib to 1.5.4 -- Bumped the protocol version to 2 +- Stopped tags from replacing Vanilla's entries diff --git a/gradle.properties b/gradle.properties index d2c9b1b167..975192f38a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,7 +17,7 @@ # Mod Properties mod_id = wilderwild - mod_version = 2.2.2 + mod_version = 2.2.3 # protocol version must be changed after each update with dual env changes protocol_version = 2 mod_loader = Fabric diff --git a/src/main/resources/data/minecraft/tags/blocks/mangrove_roots_can_grow_through.json b/src/main/resources/data/minecraft/tags/blocks/mangrove_roots_can_grow_through.json index 3798fa8866..0e0c46ba0d 100644 --- a/src/main/resources/data/minecraft/tags/blocks/mangrove_roots_can_grow_through.json +++ b/src/main/resources/data/minecraft/tags/blocks/mangrove_roots_can_grow_through.json @@ -1,4 +1,5 @@ { + "replace": false, "values": [ "wilderwild:algae" ] diff --git a/src/main/resources/data/minecraft/tags/blocks/overworld_natural_logs.json b/src/main/resources/data/minecraft/tags/blocks/overworld_natural_logs.json index 1110723e93..695b4af6ab 100644 --- a/src/main/resources/data/minecraft/tags/blocks/overworld_natural_logs.json +++ b/src/main/resources/data/minecraft/tags/blocks/overworld_natural_logs.json @@ -1,4 +1,5 @@ { + "replace": false, "values": [ "wilderwild:baobab_log", "wilderwild:cypress_log", diff --git a/src/main/resources/data/minecraft/tags/items/logs_that_burn.json b/src/main/resources/data/minecraft/tags/items/logs_that_burn.json index 88647f9e15..f46564d112 100644 --- a/src/main/resources/data/minecraft/tags/items/logs_that_burn.json +++ b/src/main/resources/data/minecraft/tags/items/logs_that_burn.json @@ -1,4 +1,5 @@ { + "replace": false, "values": [ "#wilderwild:baobab_logs", "#wilderwild:cypress_logs", diff --git a/src/main/resources/data/minecraft/tags/items/overworld_natural_logs.json b/src/main/resources/data/minecraft/tags/items/overworld_natural_logs.json index d891e9f532..5b6d20f2fb 100644 --- a/src/main/resources/data/minecraft/tags/items/overworld_natural_logs.json +++ b/src/main/resources/data/minecraft/tags/items/overworld_natural_logs.json @@ -1,4 +1,5 @@ { + "replace": false, "values": [ "wilderwild:baobab_log", "wilderwild:cypress_log", From 627cc2e6750e46dad32c5bac2a7da29e6f60b4f3 Mon Sep 17 00:00:00 2001 From: Treetrain1 Date: Thu, 28 Dec 2023 15:37:53 -0600 Subject: [PATCH 3/4] suppress more warnings --- .../java/net/frozenblock/wilderwild/block/CoconutBlock.java | 2 ++ .../net/frozenblock/wilderwild/block/DisplayLanternBlock.java | 1 + .../java/net/frozenblock/wilderwild/block/EchoGlassBlock.java | 2 +- .../net/frozenblock/wilderwild/block/FlowerLichenBlock.java | 1 + .../net/frozenblock/wilderwild/block/GloryOfTheSnowBlock.java | 2 ++ .../net/frozenblock/wilderwild/block/HangingTendrilBlock.java | 3 ++- .../java/net/frozenblock/wilderwild/block/MilkweedBlock.java | 2 ++ 7 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/frozenblock/wilderwild/block/CoconutBlock.java b/src/main/java/net/frozenblock/wilderwild/block/CoconutBlock.java index 8f6d0d4527..aae17fd8c9 100644 --- a/src/main/java/net/frozenblock/wilderwild/block/CoconutBlock.java +++ b/src/main/java/net/frozenblock/wilderwild/block/CoconutBlock.java @@ -58,6 +58,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +@SuppressWarnings("deprecation") public class CoconutBlock extends FallingBlock implements BonemealableBlock { public static final int VALID_FROND_DISTANCE = 2; public static final IntegerProperty STAGE = BlockStateProperties.STAGE; @@ -77,6 +78,7 @@ public CoconutBlock(@NotNull Properties settings) { this.registerDefaultState(this.stateDefinition.any().setValue(STAGE, 0).setValue(AGE, 0).setValue(HANGING, false)); } + @SuppressWarnings("NullableProblems") @Override protected MapCodec codec() { return null; diff --git a/src/main/java/net/frozenblock/wilderwild/block/DisplayLanternBlock.java b/src/main/java/net/frozenblock/wilderwild/block/DisplayLanternBlock.java index 0ba5624fb0..dfe2f1cebd 100644 --- a/src/main/java/net/frozenblock/wilderwild/block/DisplayLanternBlock.java +++ b/src/main/java/net/frozenblock/wilderwild/block/DisplayLanternBlock.java @@ -87,6 +87,7 @@ public DisplayLanternBlock(@NotNull Properties settings) { this.registerDefaultState(this.stateDefinition.any().setValue(HANGING, false).setValue(WATERLOGGED, false).setValue(DISPLAY_LIGHT, 0)); } + @SuppressWarnings("NullableProblems") @Override protected MapCodec codec() { return null; diff --git a/src/main/java/net/frozenblock/wilderwild/block/EchoGlassBlock.java b/src/main/java/net/frozenblock/wilderwild/block/EchoGlassBlock.java index 71b08ec711..537f3cf943 100644 --- a/src/main/java/net/frozenblock/wilderwild/block/EchoGlassBlock.java +++ b/src/main/java/net/frozenblock/wilderwild/block/EchoGlassBlock.java @@ -20,7 +20,6 @@ import net.frozenblock.lib.item.api.ItemBlockStateTagUtils; import net.frozenblock.wilderwild.entity.AncientHornProjectile; -import net.frozenblock.wilderwild.misc.WilderSharedConstants; import net.frozenblock.wilderwild.registry.RegisterProperties; import net.frozenblock.wilderwild.registry.RegisterSounds; import net.minecraft.core.BlockPos; @@ -49,6 +48,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +@SuppressWarnings("deprecation") public class EchoGlassBlock extends TintedGlassBlock { public static final IntegerProperty DAMAGE = RegisterProperties.DAMAGE; diff --git a/src/main/java/net/frozenblock/wilderwild/block/FlowerLichenBlock.java b/src/main/java/net/frozenblock/wilderwild/block/FlowerLichenBlock.java index 9ef6031db3..44353ae9b7 100644 --- a/src/main/java/net/frozenblock/wilderwild/block/FlowerLichenBlock.java +++ b/src/main/java/net/frozenblock/wilderwild/block/FlowerLichenBlock.java @@ -39,6 +39,7 @@ public FlowerLichenBlock(@NotNull Properties settings) { super(settings); } + @SuppressWarnings("NullableProblems") @Override protected MapCodec codec() { return null; diff --git a/src/main/java/net/frozenblock/wilderwild/block/GloryOfTheSnowBlock.java b/src/main/java/net/frozenblock/wilderwild/block/GloryOfTheSnowBlock.java index c40a1867db..747b7c4ee8 100644 --- a/src/main/java/net/frozenblock/wilderwild/block/GloryOfTheSnowBlock.java +++ b/src/main/java/net/frozenblock/wilderwild/block/GloryOfTheSnowBlock.java @@ -53,6 +53,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +@SuppressWarnings("deprecation") public class GloryOfTheSnowBlock extends BushBlock implements BonemealableBlock { public static final EnumProperty COLORS = RegisterProperties.FLOWER_COLOR; private static final VoxelShape SHAPE = Block.box(3.0D, 0.0D, 3.0D, 13.0D, 4.0D, 13.0D); @@ -125,6 +126,7 @@ public void performBonemeal(@NotNull ServerLevel level, @NotNull RandomSource ra level.setBlockAndUpdate(pos, state.setValue(RegisterProperties.FLOWER_COLOR, this.COLOR_LIST.get(AdvancedMath.random().nextInt(this.COLOR_LIST.size())))); } + @SuppressWarnings("NullableProblems") @Override protected MapCodec codec() { return null; diff --git a/src/main/java/net/frozenblock/wilderwild/block/HangingTendrilBlock.java b/src/main/java/net/frozenblock/wilderwild/block/HangingTendrilBlock.java index 0cb4c4fbb5..aaa5411463 100644 --- a/src/main/java/net/frozenblock/wilderwild/block/HangingTendrilBlock.java +++ b/src/main/java/net/frozenblock/wilderwild/block/HangingTendrilBlock.java @@ -84,6 +84,7 @@ public HangingTendrilBlock(@NotNull Properties settings) { this.registerDefaultState(this.stateDefinition.any().setValue(PHASE, SculkSensorPhase.INACTIVE).setValue(WATERLOGGED, false).setValue(TWITCHING, false).setValue(WRINGING_OUT, false).setValue(POWER, 0)); } + @SuppressWarnings("NullableProblems") @Override protected MapCodec codec() { return null; @@ -223,7 +224,7 @@ public void activate(@Nullable Entity entity, @NotNull Level world, @NotNull Blo boolean tendrilsCarryEvents = BlockConfig.get().tendrilsCarryEvents; SculkSensorBlock.updateNeighbours(world, pos, state); SculkSensorBlock.tryResonateVibration(tendrilsCarryEvents ? entity : null, world, pos, frequency); - world.gameEvent(tendrilsCarryEvents ? entity : null, tendrilsCarryEvents && gameEvent != null ? gameEvent : GameEvent.SCULK_SENSOR_TENDRILS_CLICKING, pos); + world.gameEvent(tendrilsCarryEvents ? entity : null, tendrilsCarryEvents ? gameEvent : GameEvent.SCULK_SENSOR_TENDRILS_CLICKING, pos); if (!state.getValue(WATERLOGGED)) { world.playSound( null, diff --git a/src/main/java/net/frozenblock/wilderwild/block/MilkweedBlock.java b/src/main/java/net/frozenblock/wilderwild/block/MilkweedBlock.java index ebd0e7bb80..4d78802681 100644 --- a/src/main/java/net/frozenblock/wilderwild/block/MilkweedBlock.java +++ b/src/main/java/net/frozenblock/wilderwild/block/MilkweedBlock.java @@ -46,6 +46,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +@SuppressWarnings("deprecation") public class MilkweedBlock extends TallFlowerBlock { private static final int MAX_AGE = 3; @@ -75,6 +76,7 @@ public void randomTick(@NotNull BlockState state, @NotNull ServerLevel level, @N } @Override + @NotNull public ItemInteractionResult useItemOn(@NotNull ItemStack stack, @NotNull BlockState state, @NotNull Level level, @NotNull BlockPos pos, @NotNull Player player, @NotNull InteractionHand hand, @NotNull BlockHitResult hit) { if (isFullyGrown(state)) { if (!level.isClientSide) { From 9e6ea85c873d9299fe232a0f0ce44a9471dc5dc3 Mon Sep 17 00:00:00 2001 From: Treetrain1 Date: Thu, 28 Dec 2023 15:47:01 -0600 Subject: [PATCH 4/4] update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 711bb5d251..b5f9708ff6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,4 +2,5 @@ Please clear changelog after each release. Thank you! ----------------- -- Stopped tags from replacing Vanilla's entries +- Fixed some tags replacing Vanilla's entries +- Fixed a possible compatibility issue regarding Baobab Nut block states