From 2ea42eab62d5abce73c704421f36608ebf6dced6 Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Thu, 31 May 2018 17:20:41 -0300 Subject: [PATCH] update handlers --- .../blockentities/BannerHandler.java | 8 ++-- .../providers/blockentities/BedHandler.java | 4 +- .../blockentities/FlowerPotHandler.java | 44 +++++++++---------- .../providers/blockentities/SkullHandler.java | 4 +- .../storage/BlockStorage.java | 10 ++--- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/BannerHandler.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/BannerHandler.java index 4c419b669..4e33294f3 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/BannerHandler.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/BannerHandler.java @@ -8,11 +8,11 @@ import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.providers.BlockEnt import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.storage.BlockStorage; public class BannerHandler implements BlockEntityProvider.BlockEntityHandler { - private final int WALL_BANNER_START = 7020; // 4 each - private final int WALL_BANNER_STOP = 7083; + private final int WALL_BANNER_START = 7092; // 4 each + private final int WALL_BANNER_STOP = 7155; - private final int BANNER_START = 6764; // 16 each - private final int BANNER_STOP = 7019; + private final int BANNER_START = 6836; // 16 each + private final int BANNER_STOP = 7091; @Override public int transform(UserConnection user, CompoundTag tag) { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/BedHandler.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/BedHandler.java index 390e05e27..3a586abe1 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/BedHandler.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/BedHandler.java @@ -19,8 +19,8 @@ public class BedHandler implements BlockEntityProvider.BlockEntityHandler { return -1; } - // RED_BED + FIRST_BED - int blockId = storage.get(position).getOriginal() - 882 + 658; + // RED_BED + FIRST_BED + int blockId = storage.get(position).getOriginal() - 954 + 730; int color = (int) tag.get("color").getValue(); blockId += (color * 16); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/FlowerPotHandler.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/FlowerPotHandler.java index 0a03a534d..1007b22e8 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/FlowerPotHandler.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/FlowerPotHandler.java @@ -12,28 +12,28 @@ public class FlowerPotHandler implements BlockEntityProvider.BlockEntityHandler private static final Map, Integer> flowers = new ConcurrentHashMap<>(); static { - register("minecraft:air", 0, 5175); - register("minecraft:sapling", 0, 5176); - register("minecraft:sapling", 1, 5177); - register("minecraft:sapling", 2, 5178); - register("minecraft:sapling", 3, 5179); - register("minecraft:sapling", 4, 5180); - register("minecraft:sapling", 5, 5181); - register("minecraft:tallgrass", 2, 5182); - register("minecraft:yellow_flower", 0, 5183); - register("minecraft:red_flower", 0, 5184); - register("minecraft:red_flower", 1, 5185); - register("minecraft:red_flower", 2, 5186); - register("minecraft:red_flower", 3, 5187); - register("minecraft:red_flower", 4, 5188); - register("minecraft:red_flower", 5, 5189); - register("minecraft:red_flower", 6, 5190); - register("minecraft:red_flower", 7, 5191); - register("minecraft:red_flower", 8, 5192); - register("minecraft:red_mushroom", 0, 5193); - register("minecraft:brown_mushroom", 0, 5194); - register("minecraft:deadbush", 0, 5195); - register("minecraft:cactus", 0, 5196); + register("minecraft:air", 0, 5247); + register("minecraft:sapling", 0, 5248); + register("minecraft:sapling", 1, 5249); + register("minecraft:sapling", 2, 5250); + register("minecraft:sapling", 3, 5251); + register("minecraft:sapling", 4, 5252); + register("minecraft:sapling", 5, 5253); + register("minecraft:tallgrass", 2, 5254); + register("minecraft:yellow_flower", 0, 5255); + register("minecraft:red_flower", 0, 5256); + register("minecraft:red_flower", 1, 5257); + register("minecraft:red_flower", 2, 5258); + register("minecraft:red_flower", 3, 5259); + register("minecraft:red_flower", 4, 5260); + register("minecraft:red_flower", 5, 5261); + register("minecraft:red_flower", 6, 5262); + register("minecraft:red_flower", 7, 5263); + register("minecraft:red_flower", 8, 5264); + register("minecraft:red_mushroom", 0, 5265); + register("minecraft:brown_mushroom", 0, 5266); + register("minecraft:deadbush", 0, 5267); + register("minecraft:cactus", 0, 5268); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/SkullHandler.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/SkullHandler.java index ec6fe0bfb..d02a45af5 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/SkullHandler.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/SkullHandler.java @@ -8,8 +8,8 @@ import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.providers.BlockEnt import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.storage.BlockStorage; public class SkullHandler implements BlockEntityProvider.BlockEntityHandler { - private final int SKULL_WALL_START = 5357; - private final int SKULL_END = 5476; + private final int SKULL_WALL_START = 5429; + private final int SKULL_END = 5548; @Override public int transform(UserConnection user, CompoundTag tag) { BlockStorage storage = user.get(BlockStorage.class); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/storage/BlockStorage.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/storage/BlockStorage.java index 862351655..85990abaa 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/storage/BlockStorage.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/storage/BlockStorage.java @@ -17,24 +17,24 @@ public class BlockStorage extends StoredObject { static { // Flower pots - whitelist.add(5175); + whitelist.add(5247); // Add those red beds for (int i = 0; i < 16; i++) - whitelist.add(882 + i); + whitelist.add(954 + i); // Add the white banners for (int i = 0; i < 20; i++) - whitelist.add(6764 + i); + whitelist.add(6836 + i); // Add the white wall banners for (int i = 0; i < 4; i++) { - whitelist.add(7020 + i); + whitelist.add(7092 + i); } // Skeleton skulls for (int i = 0; i < 5; i++) - whitelist.add(5357 + i); + whitelist.add(5429 + i); } private Map blocks = new ConcurrentHashMap<>();