Skip to content

Commit

Permalink
Add MCBE 1.20.60 updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Alemiz112 committed Jan 29, 2024
1 parent c1af656 commit 3d890d4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id("signing")
}

version = "1.20.50-SNAPSHOT"
version = "1.20.60-SNAPSHOT"
group = "org.cloudburstmc"
description = "Updates Minecraft: Bedrock Edition block states to the latest revision"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package org.cloudburstmc.blockstateupdater;

import org.cloudburstmc.blockstateupdater.util.tagupdater.CompoundTagUpdaterContext;

public class BlockStateUpdater_1_20_60 implements BlockStateUpdater {

public static final BlockStateUpdater INSTANCE = new BlockStateUpdater_1_20_60();

@Override
public void registerUpdaters(CompoundTagUpdaterContext ctx) {
ctx.addUpdater(1, 20, 60)
.match("name", "minecraft:hard_stained_glass")
.visit("states")
.edit("color", helper -> {
String color = (String) helper.getTag();
if (color.equals("silver")) {
color = "light_gray";
}
helper.getRootTag().put("name", "minecraft:hard_" + color + "_stained_glass");
})
.remove("color");

ctx.addUpdater(1, 20, 60)
.match("name", "minecraft:hard_stained_glass_pane")
.visit("states")
.edit("color", helper -> {
String color = (String) helper.getTag();
if (color.equals("silver")) {
color = "light_gray";
}
helper.getRootTag().put("name", "minecraft:hard_" + color + "_stained_glass_pane");
})
.remove("color");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class BlockStateUpdaters {
updaters.add(BlockStateUpdater_1_20_30.INSTANCE);
updaters.add(BlockStateUpdater_1_20_40.INSTANCE);
updaters.add(BlockStateUpdater_1_20_50.INSTANCE);
updaters.add(BlockStateUpdater_1_20_60.INSTANCE);

CompoundTagUpdaterContext context = new CompoundTagUpdaterContext();
updaters.forEach(updater -> updater.registerUpdaters(context));
Expand Down

0 comments on commit 3d890d4

Please sign in to comment.