From 58b8f4004b3c5c67855cc4c3d384c96338db6f8b Mon Sep 17 00:00:00 2001 From: Matsv Date: Sun, 27 Jan 2019 14:16:05 +0100 Subject: [PATCH] :paperclip: Rename 1.13.1 classes --- .../Protocol1_13To1_13_1.java | 18 +++++++++--------- ...tyPackets.java => EntityPackets1_13_1.java} | 4 ++-- ...ackets.java => InventoryPackets1_13_1.java} | 2 +- ...rldPackets.java => WorldPackets1_13_1.java} | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) rename core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/{EntityPackets.java => EntityPackets1_13_1.java} (98%) rename core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/{InventoryPackets.java => InventoryPackets1_13_1.java} (99%) rename core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/{WorldPackets.java => WorldPackets1_13_1.java} (97%) diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java index d2e0e2bf..1704d890 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java @@ -2,9 +2,9 @@ package nl.matsv.viabackwards.protocol.protocol1_13to1_13_1; import nl.matsv.viabackwards.api.BackwardsProtocol; import nl.matsv.viabackwards.api.entities.storage.EntityTracker; -import nl.matsv.viabackwards.protocol.protocol1_13to1_13_1.packets.EntityPackets; -import nl.matsv.viabackwards.protocol.protocol1_13to1_13_1.packets.InventoryPackets; -import nl.matsv.viabackwards.protocol.protocol1_13to1_13_1.packets.WorldPackets; +import nl.matsv.viabackwards.protocol.protocol1_13to1_13_1.packets.EntityPackets1_13_1; +import nl.matsv.viabackwards.protocol.protocol1_13to1_13_1.packets.InventoryPackets1_13_1; +import nl.matsv.viabackwards.protocol.protocol1_13to1_13_1.packets.WorldPackets1_13_1; import us.myles.ViaVersion.api.PacketWrapper; import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.minecraft.item.Item; @@ -19,9 +19,9 @@ public class Protocol1_13To1_13_1 extends BackwardsProtocol { @Override protected void registerPackets() { - new EntityPackets().register(this); - InventoryPackets.register(this); - WorldPackets.register(this); + new EntityPackets1_13_1().register(this); + InventoryPackets1_13_1.register(this); + WorldPackets1_13_1.register(this); //Tab complete registerIncoming(State.PLAY, 0x05, 0x05, new PacketRemapper() { @@ -47,7 +47,7 @@ public class Protocol1_13To1_13_1 extends BackwardsProtocol { handler(new PacketHandler() { @Override public void handle(PacketWrapper wrapper) throws Exception { - InventoryPackets.toServer(wrapper.get(Type.FLAT_ITEM, 0)); + InventoryPackets1_13_1.toServer(wrapper.get(Type.FLAT_ITEM, 0)); wrapper.write(Type.VAR_INT, 0); } }); @@ -128,7 +128,7 @@ public class Protocol1_13To1_13_1 extends BackwardsProtocol { wrapper.passthrough(Type.STRING); // Title wrapper.passthrough(Type.STRING); // Description Item icon = wrapper.passthrough(Type.FLAT_ITEM); - InventoryPackets.toClient(icon); + InventoryPackets1_13_1.toClient(icon); wrapper.passthrough(Type.VAR_INT); // Frame type int flags = wrapper.passthrough(Type.INT); // Flags if ((flags & 1) != 0) @@ -169,7 +169,7 @@ public class Protocol1_13To1_13_1 extends BackwardsProtocol { wrapper.passthrough(Type.STRING); Integer[] items = wrapper.passthrough(Type.VAR_INT_ARRAY); for (int j = 0; j < items.length; j++) { - items[j] = InventoryPackets.getOldItemId(items[j]); + items[j] = InventoryPackets1_13_1.getOldItemId(items[j]); } } } diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/EntityPackets.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/EntityPackets1_13_1.java similarity index 98% rename from core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/EntityPackets.java rename to core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/EntityPackets1_13_1.java index e99a5edc..984c7478 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/EntityPackets.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/EntityPackets1_13_1.java @@ -18,7 +18,7 @@ import us.myles.ViaVersion.api.type.types.version.Types1_13; import us.myles.ViaVersion.packets.State; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; -public class EntityPackets extends EntityRewriter { +public class EntityPackets1_13_1 extends EntityRewriter { @Override protected void registerPackets(Protocol1_13To1_13_1 protocol) { @@ -322,7 +322,7 @@ public class EntityPackets extends EntityRewriter { Metadata meta = e.getData(); if (meta.getMetaType() == MetaType1_13.Slot) { - InventoryPackets.toClient((Item) meta.getValue()); + InventoryPackets1_13_1.toClient((Item) meta.getValue()); } else if (meta.getMetaType() == MetaType1_13.BlockID) { // Convert to new block id int data = (int) meta.getValue(); diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/InventoryPackets.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/InventoryPackets1_13_1.java similarity index 99% rename from core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/InventoryPackets.java rename to core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/InventoryPackets1_13_1.java index 32c5c3fb..058037e7 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/InventoryPackets.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/InventoryPackets1_13_1.java @@ -8,7 +8,7 @@ import us.myles.ViaVersion.api.remapper.PacketRemapper; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.packets.State; -public class InventoryPackets { +public class InventoryPackets1_13_1 { public static void register(Protocol protocol) { diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/WorldPackets.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/WorldPackets1_13_1.java similarity index 97% rename from core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/WorldPackets.java rename to core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/WorldPackets1_13_1.java index a36ed077..2d3dc3fa 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/WorldPackets.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/packets/WorldPackets1_13_1.java @@ -13,7 +13,7 @@ import us.myles.ViaVersion.packets.State; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.types.Chunk1_13Type; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; -public class WorldPackets { +public class WorldPackets1_13_1 { public static void register(Protocol protocol) { //Chunk @@ -109,7 +109,7 @@ public class WorldPackets { int id = wrapper.get(Type.INT, 0); int data = wrapper.get(Type.INT, 1); if (id == 1010) { // Play record - wrapper.set(Type.INT, 1, data = InventoryPackets.getNewItemId(data)); + wrapper.set(Type.INT, 1, data = InventoryPackets1_13_1.getNewItemId(data)); } else if (id == 2001) { // Block break + block break sound wrapper.set(Type.INT, 1, data = Protocol1_13To1_13_1.getNewBlockStateId(data)); } @@ -140,7 +140,7 @@ public class WorldPackets { int data = wrapper.passthrough(Type.VAR_INT); wrapper.set(Type.VAR_INT, 0, Protocol1_13To1_13_1.getNewBlockStateId(data)); } else if (id == 27) { - InventoryPackets.toClient(wrapper.passthrough(Type.FLAT_ITEM)); + InventoryPackets1_13_1.toClient(wrapper.passthrough(Type.FLAT_ITEM)); } } });