Skip to content

Commit a233c0b

Browse files
committed
Add updater for 1.19.20 & bump version
1 parent b1446b4 commit a233c0b

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.nukkitx</groupId>
88
<artifactId>block-state-updater</artifactId>
9-
<version>1.19.0-SNAPSHOT</version>
9+
<version>1.19.20-SNAPSHOT</version>
1010
<name>BlockStateUpdater</name>
1111
<description>Updates Minecraft: Bedrock Edition block states to the latest revision</description>
1212
<inceptionYear>2020</inceptionYear>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.nukkitx.blockstateupdater;
2+
3+
import com.nukkitx.blockstateupdater.util.tagupdater.CompoundTagUpdaterContext;
4+
5+
public class BlockStateUpdater_1_19_20 implements BlockStateUpdater {
6+
7+
public static final BlockStateUpdater INSTANCE = new BlockStateUpdater_1_19_20();
8+
9+
@Override
10+
public void registerUpdaters(CompoundTagUpdaterContext context) {
11+
this.addProperty(context, "minecraft:muddy_mangrove_roots", "pillar_axis", "y");
12+
}
13+
14+
private void addProperty(CompoundTagUpdaterContext context, String identifier, String propertyName, Object value) {
15+
context.addUpdater(1, 18, 10, true) // Here we go again Mojang
16+
.match("name", identifier)
17+
.visit("states")
18+
.tryAdd(propertyName, value);
19+
}
20+
}

src/main/java/com/nukkitx/blockstateupdater/BlockStateUpdaters.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class BlockStateUpdaters {
2929
updaters.add(BlockStateUpdater_1_18_10.INSTANCE);
3030
updaters.add(BlockStateUpdater_1_18_30.INSTANCE);
3131
updaters.add(BlockStateUpdater_1_19_0.INSTANCE);
32+
updaters.add(BlockStateUpdater_1_19_20.INSTANCE);
3233

3334
CompoundTagUpdaterContext context = new CompoundTagUpdaterContext();
3435
updaters.forEach(updater -> updater.registerUpdaters(context));

0 commit comments

Comments
 (0)