From dea09b4476cecd78595e86f6751107946f273ae1 Mon Sep 17 00:00:00 2001 From: PetteriM1 <26197131+PetteriM1@users.noreply.github.com> Date: Fri, 13 Sep 2024 19:21:44 +0300 Subject: [PATCH] Fix dead coral updater --- .../blockstateupdater/BlockStateUpdater_1_20_0.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cloudburstmc/blockstateupdater/BlockStateUpdater_1_20_0.java b/src/main/java/org/cloudburstmc/blockstateupdater/BlockStateUpdater_1_20_0.java index ba41cc5..4a55388 100644 --- a/src/main/java/org/cloudburstmc/blockstateupdater/BlockStateUpdater_1_20_0.java +++ b/src/main/java/org/cloudburstmc/blockstateupdater/BlockStateUpdater_1_20_0.java @@ -44,6 +44,12 @@ public void registerUpdaters(CompoundTagUpdaterContext ctx) { this.addCoralUpdater(ctx, "yellow", "minecraft:horn_coral"); this.addCoralUpdater(ctx, "purple", "minecraft:bubble_coral"); + this.addDeadCoralUpdater(ctx, "red", "minecraft:dead_fire_coral"); + this.addDeadCoralUpdater(ctx, "pink", "minecraft:dead_brain_coral"); + this.addDeadCoralUpdater(ctx, "blue", "minecraft:dead_tube_coral"); + this.addDeadCoralUpdater(ctx, "yellow", "minecraft:dead_horn_coral"); + this.addDeadCoralUpdater(ctx, "purple", "minecraft:dead_bubble_coral"); + ctx.addUpdater(1, 20, 0) .match("name", "minecraft:calibrated_sculk_sensor") .visit("states") @@ -114,7 +120,6 @@ private void addCauldronUpdater(CompoundTagUpdaterContext ctx, String type) { } private void addCoralUpdater(CompoundTagUpdaterContext context, String type, String newIdentifier) { - // Two updates to match final version context.addUpdater(1, 20, 0) .match("name", "minecraft:coral") .visit("states") @@ -123,7 +128,9 @@ private void addCoralUpdater(CompoundTagUpdaterContext context, String type, Str .edit("coral_color", helper -> helper.getRootTag().put("name", newIdentifier)) .remove("coral_color") .remove("dead_bit"); + } + private void addDeadCoralUpdater(CompoundTagUpdaterContext context, String type, String newIdentifier) { context.addUpdater(1, 20, 0) .match("name", "minecraft:coral") .visit("states")