Skip to content

Commit

Permalink
Minecraft 1.21.4 and Velocity b453+ support (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
UserNugget authored Dec 14, 2024
1 parent 5690892 commit c9fcc43
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public enum BlockEntityVersion {
MINECRAFT_1_20_3(EnumSet.of(ProtocolVersion.MINECRAFT_1_20_3)),
MINECRAFT_1_20_5(EnumSet.of(ProtocolVersion.MINECRAFT_1_20_5)),
MINECRAFT_1_21(EnumSet.of(ProtocolVersion.MINECRAFT_1_21)),
MINECRAFT_1_21_2(EnumSet.of(ProtocolVersion.MINECRAFT_1_21_2));
MINECRAFT_1_21_2(EnumSet.of(ProtocolVersion.MINECRAFT_1_21_2)),
MINECRAFT_1_21_4(EnumSet.of(ProtocolVersion.MINECRAFT_1_21_4));

private static final EnumMap<ProtocolVersion, BlockEntityVersion> MC_VERSION_TO_ITEM_VERSIONS = new EnumMap<>(ProtocolVersion.class);

Expand Down Expand Up @@ -66,6 +67,7 @@ public static BlockEntityVersion parse(String from) {
case "1.20.5" -> MINECRAFT_1_20_5;
case "1.21" -> MINECRAFT_1_21;
case "1.21.2" -> MINECRAFT_1_21_2;
case "1.21.4" -> MINECRAFT_1_21_4;
default -> LEGACY;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public enum WorldVersion {
MINECRAFT_1_20(EnumSet.range(ProtocolVersion.MINECRAFT_1_20, ProtocolVersion.MINECRAFT_1_20_2)),
MINECRAFT_1_20_3(ProtocolVersion.MINECRAFT_1_20_3),
MINECRAFT_1_20_5(EnumSet.range(ProtocolVersion.MINECRAFT_1_20_5, ProtocolVersion.MINECRAFT_1_21)),
MINECRAFT_1_21_2(EnumSet.range(ProtocolVersion.MINECRAFT_1_21_2, ProtocolVersion.MAXIMUM_VERSION));
MINECRAFT_1_21_2(EnumSet.range(ProtocolVersion.MINECRAFT_1_21_2, ProtocolVersion.MINECRAFT_1_21_2)),
MINECRAFT_1_21_4(EnumSet.range(ProtocolVersion.MINECRAFT_1_21_4, ProtocolVersion.MAXIMUM_VERSION));

private static final EnumMap<ProtocolVersion, WorldVersion> MC_VERSION_TO_ITEM_VERSIONS = new EnumMap<>(ProtocolVersion.class);

Expand Down Expand Up @@ -74,6 +75,7 @@ public static WorldVersion parse(String from) {
case "1.20.3" -> MINECRAFT_1_20_3;
case "1.20.5" -> MINECRAFT_1_20_5;
case "1.21.2" -> MINECRAFT_1_21_2;
case "1.21.4" -> MINECRAFT_1_21_4;
default -> LEGACY;
};
}
Expand Down
6 changes: 4 additions & 2 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ enum MinecraftVersion {
MINECRAFT_1_20_3(765),
MINECRAFT_1_20_5(766),
MINECRAFT_1_21(767),
MINECRAFT_1_21_2(768)
MINECRAFT_1_21_2(768),
MINECRAFT_1_21_4(769)

public static final List<MinecraftVersion> WORLD_VERSIONS = List.of(
MINECRAFT_1_13,
Expand All @@ -145,7 +146,8 @@ enum MinecraftVersion {
MINECRAFT_1_20,
MINECRAFT_1_20_3,
MINECRAFT_1_20_5,
MINECRAFT_1_21_2
MINECRAFT_1_21_2,
MINECRAFT_1_21_4
)

public static final MinecraftVersion MINIMUM_VERSION = MINECRAFT_1_7_2
Expand Down
13 changes: 13 additions & 0 deletions plugin/mapping/fallbackdata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
{
"MINECRAFT_1_21_2": {
"minecraft:resin_clump": "minecraft:glow_lichen",
"minecraft:resin_block": "minecraft:cut_copper",
"minecraft:resin_bricks": "minecraft:bricks",
"minecraft:resin_brick_stairs": "minecraft:brick_stairs",
"minecraft:resin_brick_slab": "minecraft:brick_slab",
"minecraft:resin_brick_wall": "minecraft:brick_wall",
"minecraft:chiseled_resin_bricks": "minecraft:chiseled_copper",
"minecraft:open_eyeblossom": "minecraft:torchflower",
"minecraft:closed_eyeblossom": "minecraft:cornflower",
"minecraft:potted_open_eyeblossom": "minecraft:potted_torchflower",
"minecraft:potted_closed_eyeblossom": "minecraft:potted_cornflower"
},
"MINECRAFT_1_21": {
"minecraft:pale_oak_wood": "minecraft:birch_wood",
"minecraft:pale_oak_planks": "minecraft:birch_planks",
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/main/java/net/elytrium/limboapi/LimboAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
@SuppressFBWarnings("MS_EXPOSE_REP")
public class LimboAPI implements LimboFactory {

private static final int SUPPORTED_MAXIMUM_PROTOCOL_VERSION_NUMBER = 768;
private static final int SUPPORTED_MAXIMUM_PROTOCOL_VERSION_NUMBER = 769;

@MonotonicNonNull
private static Logger LOGGER;
Expand Down

0 comments on commit c9fcc43

Please sign in to comment.