Skip to content

Commit

Permalink
Add MCBE 1.21.40 updaters
Browse files Browse the repository at this point in the history
  • Loading branch information
Alemiz112 committed Oct 20, 2024
1 parent 6bccab2 commit a4d71e7
Show file tree
Hide file tree
Showing 4 changed files with 205 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.21.30-SNAPSHOT"
version = "1.21.40-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,33 @@
package org.cloudburstmc.blockstateupdater;

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

public class BlockStateUpdater_1_21_40 implements BlockStateUpdater {

public static final BlockStateUpdater INSTANCE = new BlockStateUpdater_1_21_40();

@Override
public void registerUpdaters(CompoundTagUpdaterContext ctx) {
// Skull blocks was now split into individual blocks
// however, skull type was determined by block entity or item data, and we do not have that information here
ctx.addUpdater(1, 21, 40)
.match("name", "minecraft:skull")
.edit("name", helper -> {
helper.replaceWith("name", "minecraft:skeleton_skull");
});


// these are not vanilla updaters
// but use this one to bump the version to 18163713 as that's what vanilla does
ctx.addUpdater(1, 21, 40)
.match("name", "minecraft:cherry_wood")
.visit("states")
.remove("stripped_bit");

ctx.addUpdater(1, 21, 40, false, false)
.match("name", "minecraft:mangrove_wood")
.visit("states")
.remove("stripped_bit");

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class BlockStateUpdaters {
updaters.add(BlockStateUpdater_1_21_10.INSTANCE);
updaters.add(BlockStateUpdater_1_21_20.INSTANCE);
updaters.add(BlockStateUpdater_1_21_30.INSTANCE);
updaters.add(BlockStateUpdater_1_21_40.INSTANCE);

CompoundTagUpdaterContext context = new CompoundTagUpdaterContext();
updaters.forEach(updater -> updater.registerUpdaters(context));
Expand Down
170 changes: 170 additions & 0 deletions src/main/resources/legacy_block_data_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -18620,5 +18620,175 @@
"wall_connection_type_east": "none",
"wall_post_bit": false
}
],
"minecraft:creeper_head": [
{
"facing_direction": 0
},
{
"facing_direction": 1
},
{
"facing_direction": 2
},
{
"facing_direction": 3
},
{
"facing_direction": 4
},
{
"facing_direction": 5
}
],
"minecraft:dragon_head": [
{
"facing_direction": 0
},
{
"facing_direction": 1
},
{
"facing_direction": 2
},
{
"facing_direction": 3
},
{
"facing_direction": 4
},
{
"facing_direction": 5
}
],
"minecraft:piglin_head": [
{
"facing_direction": 0
},
{
"facing_direction": 1
},
{
"facing_direction": 2
},
{
"facing_direction": 3
},
{
"facing_direction": 4
},
{
"facing_direction": 5
}
],
"minecraft:player_head": [
{
"facing_direction": 0
},
{
"facing_direction": 1
},
{
"facing_direction": 2
},
{
"facing_direction": 3
},
{
"facing_direction": 4
},
{
"facing_direction": 5
}
],
"minecraft:wither_skeleton_skull": [
{
"facing_direction": 0
},
{
"facing_direction": 1
},
{
"facing_direction": 2
},
{
"facing_direction": 3
},
{
"facing_direction": 4
},
{
"facing_direction": 5
}
],
"minecraft:zombie_head": [
{
"facing_direction": 0
},
{
"facing_direction": 1
},
{
"facing_direction": 2
},
{
"facing_direction": 3
},
{
"facing_direction": 4
},
{
"facing_direction": 5
}
],
"minecraft:mushroom_stem": [
{
"huge_mushroom_bits": 0
},
{
"huge_mushroom_bits": 1
},
{
"huge_mushroom_bits": 2
},
{
"huge_mushroom_bits": 3
},
{
"huge_mushroom_bits": 4
},
{
"huge_mushroom_bits": 5
},
{
"huge_mushroom_bits": 6
},
{
"huge_mushroom_bits": 7
},
{
"huge_mushroom_bits": 8
},
{
"huge_mushroom_bits": 9
},
{
"huge_mushroom_bits": 10
},
{
"huge_mushroom_bits": 11
},
{
"huge_mushroom_bits": 12
},
{
"huge_mushroom_bits": 13
},
{
"huge_mushroom_bits": 14
},
{
"huge_mushroom_bits": 15
}
]
}

0 comments on commit a4d71e7

Please sign in to comment.