From 4a8534c16480ca421ee8dd4c9228fc04bff4a097 Mon Sep 17 00:00:00 2001 From: Myles Date: Tue, 23 Apr 2019 15:34:17 +0100 Subject: [PATCH] Refactor class names for protocols The inconsistency was too much for me. --- .../protocol1_9to1_8/ArmorListener.java | 6 ++-- .../protocol1_9to1_8/BlockListener.java | 4 +-- .../protocol1_9to1_8/DeathListener.java | 8 +++--- .../protocol1_9to1_8/PaperPatch.java | 4 +-- .../bungee/handlers/BungeeServerHandler.java | 4 +-- .../bungee/listeners/ElytraPatch.java | 6 ++-- .../providers/BungeeMovementTransmitter.java | 4 +-- .../api/protocol/ProtocolRegistry.java | 28 +++++++++---------- .../us/myles/ViaVersion/boss/CommonBoss.java | 8 +++--- .../protocols/base/BaseProtocol1_7.java | 4 +-- ...1TO1_12.java => Protocol1_12_1To1_12.java} | 2 +- ..._12_1.java => Protocol1_12_2To1_12_1.java} | 2 +- .../Protocol1_12To1_11_1.java | 4 +-- ...3_4.java => Protocol1_9_1_2To1_9_3_4.java} | 2 +- .../chunks/BlockEntity.java | 4 +-- ..._9_1TO1_9.java => Protocol1_9_1To1_9.java} | 2 +- ...9_1_2.java => Protocol1_9_3To1_9_1_2.java} | 2 +- .../protocol1_9to1_8/ItemRewriter.java | 4 +-- ...col1_9TO1_8.java => Protocol1_9To1_8.java} | 4 +-- .../protocol1_9to1_8/ViaIdleThread.java | 2 +- .../metadata/MetadataRewriter.java | 4 +-- .../packets/EntityPackets.java | 8 +++--- .../packets/InventoryPackets.java | 10 +++---- .../packets/PlayerPackets.java | 24 ++++++++-------- .../packets/SpawnPackets.java | 6 ++-- .../packets/WorldPackets.java | 28 +++++++++---------- .../providers/CommandBlockProvider.java | 4 +-- .../storage/EntityTracker.java | 10 +++---- ..._9TO1_9_1.java => Protocol1_9To1_9_1.java} | 2 +- .../sponge4/Sponge4ArmorListener.java | 6 ++-- .../protocol1_9to1_8/BlockListener.java | 4 +-- .../protocol1_9to1_8/DeathListener.java | 8 +++--- .../sponge5/Sponge5ArmorListener.java | 6 ++-- .../handlers/VelocityServerHandler.java | 4 +-- .../velocity/listeners/ElytraPatch.java | 6 ++-- .../VelocityMovementTransmitter.java | 4 +-- 36 files changed, 119 insertions(+), 119 deletions(-) rename common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_1to1_12/{Protocol1_12_1TO1_12.java => Protocol1_12_1To1_12.java} (98%) rename common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_2to1_12_1/{Protocol1_12_2TO1_12_1.java => Protocol1_12_2To1_12_1.java} (94%) rename common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/{Protocol1_9_1_2TO1_9_3_4.java => Protocol1_9_1_2To1_9_3_4.java} (98%) rename common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1to1_9/{Protocol1_9_1TO1_9.java => Protocol1_9_1To1_9.java} (97%) rename common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_3to1_9_1_2/{Protocol1_9_3TO1_9_1_2.java => Protocol1_9_3To1_9_1_2.java} (99%) rename common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/{Protocol1_9TO1_8.java => Protocol1_9To1_8.java} (97%) rename common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_9_1/{Protocol1_9TO1_9_1.java => Protocol1_9To1_9_1.java} (97%) diff --git a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/ArmorListener.java b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/ArmorListener.java index cddf4fe82..c40fc9b83 100644 --- a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/ArmorListener.java +++ b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/ArmorListener.java @@ -20,7 +20,7 @@ import us.myles.ViaVersion.api.Via; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.bukkit.listeners.ViaBukkitListener; import us.myles.ViaVersion.protocols.protocol1_9to1_8.ArmorType; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import java.util.UUID; @@ -29,7 +29,7 @@ public class ArmorListener extends ViaBukkitListener { private static final UUID ARMOR_ATTRIBUTE = UUID.fromString("2AD3F246-FEE1-4E67-B886-69FD380BB150"); public ArmorListener(ViaVersionPlugin plugin) { - super(plugin, Protocol1_9TO1_8.class); + super(plugin, Protocol1_9To1_8.class); } public void sendArmorUpdate(Player player) { @@ -53,7 +53,7 @@ public class ArmorListener extends ViaBukkitListener { wrapper.write(Type.DOUBLE, (double) armor); // the modifier value wrapper.write(Type.BYTE, (byte) 0);// the modifier operation, 0 is add number - wrapper.send(Protocol1_9TO1_8.class); + wrapper.send(Protocol1_9To1_8.class); } catch (Exception e) { e.printStackTrace(); } diff --git a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/BlockListener.java b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/BlockListener.java index 801e406cd..7ef92f824 100644 --- a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/BlockListener.java +++ b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/BlockListener.java @@ -7,13 +7,13 @@ import org.bukkit.event.block.BlockPlaceEvent; import us.myles.ViaVersion.ViaVersionPlugin; import us.myles.ViaVersion.api.minecraft.Position; import us.myles.ViaVersion.bukkit.listeners.ViaBukkitListener; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.EntityTracker; public class BlockListener extends ViaBukkitListener { public BlockListener(ViaVersionPlugin plugin) { - super(plugin, Protocol1_9TO1_8.class); + super(plugin, Protocol1_9To1_8.class); } @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) diff --git a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/DeathListener.java b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/DeathListener.java index de1f0d110..49d641d47 100644 --- a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/DeathListener.java +++ b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/DeathListener.java @@ -11,11 +11,11 @@ import us.myles.ViaVersion.api.Via; import us.myles.ViaVersion.api.ViaVersion; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.bukkit.listeners.ViaBukkitListener; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; public class DeathListener extends ViaBukkitListener { public DeathListener(ViaVersionPlugin plugin) { - super(plugin, Protocol1_9TO1_8.class); + super(plugin, Protocol1_9To1_8.class); } @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) @@ -44,9 +44,9 @@ public class DeathListener extends ViaBukkitListener { wrapper.write(Type.VAR_INT, 2); // Event - Entity dead wrapper.write(Type.VAR_INT, p.getEntityId()); // Player ID wrapper.write(Type.INT, p.getEntityId()); // Entity ID - Protocol1_9TO1_8.FIX_JSON.write(wrapper, msg); // Message + Protocol1_9To1_8.FIX_JSON.write(wrapper, msg); // Message - wrapper.send(Protocol1_9TO1_8.class); + wrapper.send(Protocol1_9To1_8.class); } catch (Exception e) { e.printStackTrace(); } diff --git a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/PaperPatch.java b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/PaperPatch.java index 5fbd1562a..9330e822d 100644 --- a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/PaperPatch.java +++ b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/PaperPatch.java @@ -7,12 +7,12 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.block.BlockPlaceEvent; import us.myles.ViaVersion.ViaVersionPlugin; import us.myles.ViaVersion.bukkit.listeners.ViaBukkitListener; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; public class PaperPatch extends ViaBukkitListener { public PaperPatch(ViaVersionPlugin plugin) { - super(plugin, Protocol1_9TO1_8.class); + super(plugin, Protocol1_9To1_8.class); } /* diff --git a/bungee/src/main/java/us/myles/ViaVersion/bungee/handlers/BungeeServerHandler.java b/bungee/src/main/java/us/myles/ViaVersion/bungee/handlers/BungeeServerHandler.java index ff85857f0..3540c9cbb 100644 --- a/bungee/src/main/java/us/myles/ViaVersion/bungee/handlers/BungeeServerHandler.java +++ b/bungee/src/main/java/us/myles/ViaVersion/bungee/handlers/BungeeServerHandler.java @@ -21,7 +21,7 @@ import us.myles.ViaVersion.bungee.service.ProtocolDetectorService; import us.myles.ViaVersion.bungee.storage.BungeeStorage; import us.myles.ViaVersion.protocols.base.ProtocolInfo; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.packets.InventoryPackets; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.EntityTracker; import java.lang.reflect.Field; @@ -120,7 +120,7 @@ public class BungeeServerHandler implements Listener { PacketWrapper wrapper = new PacketWrapper(0x0C, null, user); wrapper.write(Type.UUID, uuid); wrapper.write(Type.VAR_INT, 1); // remove - wrapper.send(Protocol1_9TO1_8.class, true, true); + wrapper.send(Protocol1_9To1_8.class, true, true); } storage.getBossbar().clear(); } diff --git a/bungee/src/main/java/us/myles/ViaVersion/bungee/listeners/ElytraPatch.java b/bungee/src/main/java/us/myles/ViaVersion/bungee/listeners/ElytraPatch.java index 2d051cbdf..8265f8804 100644 --- a/bungee/src/main/java/us/myles/ViaVersion/bungee/listeners/ElytraPatch.java +++ b/bungee/src/main/java/us/myles/ViaVersion/bungee/listeners/ElytraPatch.java @@ -12,7 +12,7 @@ import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_9; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.api.type.types.version.Types1_9; import us.myles.ViaVersion.protocols.base.ProtocolInfo; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.EntityTracker; import java.util.Collections; @@ -28,7 +28,7 @@ public class ElytraPatch implements Listener { if (user == null) return; try { - if (user.get(ProtocolInfo.class).getPipeline().contains(Protocol1_9TO1_8.class)) { + if (user.get(ProtocolInfo.class).getPipeline().contains(Protocol1_9To1_8.class)) { int entityId = user.get(EntityTracker.class).getProvidedEntityId(); PacketWrapper wrapper = new PacketWrapper(0x39, null, user); @@ -36,7 +36,7 @@ public class ElytraPatch implements Listener { wrapper.write(Type.VAR_INT, entityId); wrapper.write(Types1_9.METADATA_LIST, Collections.singletonList(new Metadata(0, MetaType1_9.Byte, (byte) 0))); - wrapper.send(Protocol1_9TO1_8.class); + wrapper.send(Protocol1_9To1_8.class); } } catch (Exception e) { e.printStackTrace(); diff --git a/bungee/src/main/java/us/myles/ViaVersion/bungee/providers/BungeeMovementTransmitter.java b/bungee/src/main/java/us/myles/ViaVersion/bungee/providers/BungeeMovementTransmitter.java index 4b6c93193..90928ea64 100644 --- a/bungee/src/main/java/us/myles/ViaVersion/bungee/providers/BungeeMovementTransmitter.java +++ b/bungee/src/main/java/us/myles/ViaVersion/bungee/providers/BungeeMovementTransmitter.java @@ -5,7 +5,7 @@ import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.packets.State; import us.myles.ViaVersion.protocols.base.ProtocolInfo; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.MovementTracker; @@ -25,7 +25,7 @@ public class BungeeMovementTransmitter extends MovementTransmitterProvider { PacketWrapper wrapper = new PacketWrapper(0x03, null, userConnection); wrapper.write(Type.BOOLEAN, userConnection.get(MovementTracker.class).isGround()); try { - wrapper.sendToServer(Protocol1_9TO1_8.class); + wrapper.sendToServer(Protocol1_9To1_8.class); } catch (Exception e) { e.printStackTrace(); } diff --git a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java index 397320c8e..f94f10ff3 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java +++ b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java @@ -10,16 +10,16 @@ import us.myles.ViaVersion.protocols.base.BaseProtocol1_7; import us.myles.ViaVersion.protocols.protocol1_10to1_9_3.Protocol1_10To1_9_3_4; import us.myles.ViaVersion.protocols.protocol1_11_1to1_11.Protocol1_11_1To1_11; import us.myles.ViaVersion.protocols.protocol1_11to1_10.Protocol1_11To1_10; -import us.myles.ViaVersion.protocols.protocol1_12_1to1_12.Protocol1_12_1TO1_12; -import us.myles.ViaVersion.protocols.protocol1_12_2to1_12_1.Protocol1_12_2TO1_12_1; +import us.myles.ViaVersion.protocols.protocol1_12_1to1_12.Protocol1_12_1To1_12; +import us.myles.ViaVersion.protocols.protocol1_12_2to1_12_1.Protocol1_12_2To1_12_1; import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.Protocol1_12To1_11_1; import us.myles.ViaVersion.protocols.protocol1_13_2to1_13_1.Protocol1_13_2To1_13_1; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.Protocol1_13To1_12_2; -import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.Protocol1_9_1_2TO1_9_3_4; -import us.myles.ViaVersion.protocols.protocol1_9_1to1_9.Protocol1_9_1TO1_9; -import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.Protocol1_9_3TO1_9_1_2; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; -import us.myles.ViaVersion.protocols.protocol1_9to1_9_1.Protocol1_9TO1_9_1; +import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.Protocol1_9_1_2To1_9_3_4; +import us.myles.ViaVersion.protocols.protocol1_9_1to1_9.Protocol1_9_1To1_9; +import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.Protocol1_9_3To1_9_1_2; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_9_1.Protocol1_9To1_9_1; import us.myles.ViaVersion.protocols.protocol1_13_1to1_13.Protocol1_13_1To1_13; import java.util.*; @@ -41,20 +41,20 @@ public class ProtocolRegistry { registerBaseProtocol(new BaseProtocol1_7(), Range.all()); // Register built in protocols - registerProtocol(new Protocol1_9TO1_8(), Collections.singletonList(ProtocolVersion.v1_9.getId()), ProtocolVersion.v1_8.getId()); - registerProtocol(new Protocol1_9_1TO1_9(), Arrays.asList(ProtocolVersion.v1_9_1.getId(), ProtocolVersion.v1_9_2.getId()), ProtocolVersion.v1_9.getId()); - registerProtocol(new Protocol1_9_3TO1_9_1_2(), Collections.singletonList(ProtocolVersion.v1_9_3.getId()), ProtocolVersion.v1_9_2.getId()); + registerProtocol(new Protocol1_9To1_8(), Collections.singletonList(ProtocolVersion.v1_9.getId()), ProtocolVersion.v1_8.getId()); + registerProtocol(new Protocol1_9_1To1_9(), Arrays.asList(ProtocolVersion.v1_9_1.getId(), ProtocolVersion.v1_9_2.getId()), ProtocolVersion.v1_9.getId()); + registerProtocol(new Protocol1_9_3To1_9_1_2(), Collections.singletonList(ProtocolVersion.v1_9_3.getId()), ProtocolVersion.v1_9_2.getId()); // Only supported for 1.9.4 server to 1.9 (nothing else) - registerProtocol(new Protocol1_9TO1_9_1(), Collections.singletonList(ProtocolVersion.v1_9.getId()), ProtocolVersion.v1_9_2.getId()); - registerProtocol(new Protocol1_9_1_2TO1_9_3_4(), Arrays.asList(ProtocolVersion.v1_9_1.getId(), ProtocolVersion.v1_9_2.getId()), ProtocolVersion.v1_9_3.getId()); + registerProtocol(new Protocol1_9To1_9_1(), Collections.singletonList(ProtocolVersion.v1_9.getId()), ProtocolVersion.v1_9_2.getId()); + registerProtocol(new Protocol1_9_1_2To1_9_3_4(), Arrays.asList(ProtocolVersion.v1_9_1.getId(), ProtocolVersion.v1_9_2.getId()), ProtocolVersion.v1_9_3.getId()); registerProtocol(new Protocol1_10To1_9_3_4(), Collections.singletonList(ProtocolVersion.v1_10.getId()), ProtocolVersion.v1_9_3.getId()); registerProtocol(new Protocol1_11To1_10(), Collections.singletonList(ProtocolVersion.v1_11.getId()), ProtocolVersion.v1_10.getId()); registerProtocol(new Protocol1_11_1To1_11(), Collections.singletonList(ProtocolVersion.v1_11_1.getId()), ProtocolVersion.v1_11.getId()); registerProtocol(new Protocol1_12To1_11_1(), Collections.singletonList(ProtocolVersion.v1_12.getId()), ProtocolVersion.v1_11_1.getId()); - registerProtocol(new Protocol1_12_1TO1_12(), Collections.singletonList(ProtocolVersion.v1_12_1.getId()), ProtocolVersion.v1_12.getId()); - registerProtocol(new Protocol1_12_2TO1_12_1(), Collections.singletonList(ProtocolVersion.v1_12_2.getId()), ProtocolVersion.v1_12_1.getId()); + registerProtocol(new Protocol1_12_1To1_12(), Collections.singletonList(ProtocolVersion.v1_12_1.getId()), ProtocolVersion.v1_12.getId()); + registerProtocol(new Protocol1_12_2To1_12_1(), Collections.singletonList(ProtocolVersion.v1_12_2.getId()), ProtocolVersion.v1_12_1.getId()); registerProtocol(new Protocol1_13To1_12_2(), Collections.singletonList(ProtocolVersion.v1_13.getId()), ProtocolVersion.v1_12_2.getId()); registerProtocol(new Protocol1_13_1To1_13(), Arrays.asList(ProtocolVersion.v1_13_1.getId()), ProtocolVersion.v1_13.getId()); diff --git a/common/src/main/java/us/myles/ViaVersion/boss/CommonBoss.java b/common/src/main/java/us/myles/ViaVersion/boss/CommonBoss.java index 76930a34c..a23bf4918 100644 --- a/common/src/main/java/us/myles/ViaVersion/boss/CommonBoss.java +++ b/common/src/main/java/us/myles/ViaVersion/boss/CommonBoss.java @@ -13,7 +13,7 @@ import us.myles.ViaVersion.api.boss.BossStyle; import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.protocol.ProtocolVersion; import us.myles.ViaVersion.api.type.Type; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import java.util.*; @@ -167,7 +167,7 @@ public abstract class CommonBoss extends BossBar { return; } try { - wrapper.send(Protocol1_9TO1_8.class); + wrapper.send(Protocol1_9To1_8.class); } catch (Exception e) { e.printStackTrace(); } @@ -180,7 +180,7 @@ public abstract class CommonBoss extends BossBar { wrapper.write(Type.VAR_INT, action.getId()); switch (action) { case ADD: - Protocol1_9TO1_8.FIX_JSON.write(wrapper, title); + Protocol1_9To1_8.FIX_JSON.write(wrapper, title); wrapper.write(Type.FLOAT, health); wrapper.write(Type.VAR_INT, color.getId()); wrapper.write(Type.VAR_INT, style.getId()); @@ -192,7 +192,7 @@ public abstract class CommonBoss extends BossBar { wrapper.write(Type.FLOAT, health); break; case UPDATE_TITLE: - Protocol1_9TO1_8.FIX_JSON.write(wrapper, title); + Protocol1_9To1_8.FIX_JSON.write(wrapper, title); break; case UPDATE_STYLE: wrapper.write(Type.VAR_INT, color.getId()); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/base/BaseProtocol1_7.java b/common/src/main/java/us/myles/ViaVersion/protocols/base/BaseProtocol1_7.java index 919194d7d..982a099b1 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/base/BaseProtocol1_7.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/base/BaseProtocol1_7.java @@ -18,7 +18,7 @@ import us.myles.ViaVersion.api.remapper.PacketHandler; import us.myles.ViaVersion.api.remapper.PacketRemapper; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.packets.State; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.util.GsonUtil; import java.util.List; @@ -169,7 +169,7 @@ public class BaseProtocol1_7 extends Protocol { if (!wrapper.user().getChannel().isOpen()) return; PacketWrapper disconnectPacket = new PacketWrapper(0x00, null, wrapper.user()); // Disconnect Packet - Protocol1_9TO1_8.FIX_JSON.write(disconnectPacket, ChatColor.translateAlternateColorCodes('&', Via.getConfig().getBlockedDisconnectMsg())); + Protocol1_9To1_8.FIX_JSON.write(disconnectPacket, ChatColor.translateAlternateColorCodes('&', Via.getConfig().getBlockedDisconnectMsg())); wrapper.cancel(); // cancel current // Send and close diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_1to1_12/Protocol1_12_1TO1_12.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_1to1_12/Protocol1_12_1To1_12.java similarity index 98% rename from common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_1to1_12/Protocol1_12_1TO1_12.java rename to common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_1to1_12/Protocol1_12_1To1_12.java index 21812565a..49e886f24 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_1to1_12/Protocol1_12_1TO1_12.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_1to1_12/Protocol1_12_1To1_12.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 Protocol1_12_1TO1_12 extends Protocol { +public class Protocol1_12_1To1_12 extends Protocol { @Override protected void registerPackets() { registerOutgoing(State.PLAY, -1, 0x2B); // TODO new packet? diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_2to1_12_1/Protocol1_12_2TO1_12_1.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_2to1_12_1/Protocol1_12_2To1_12_1.java similarity index 94% rename from common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_2to1_12_1/Protocol1_12_2TO1_12_1.java rename to common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_2to1_12_1/Protocol1_12_2To1_12_1.java index 7f31d60be..9e46ef1e4 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_2to1_12_1/Protocol1_12_2TO1_12_1.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12_2to1_12_1/Protocol1_12_2To1_12_1.java @@ -6,7 +6,7 @@ import us.myles.ViaVersion.api.remapper.PacketRemapper; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.packets.State; -public class Protocol1_12_2TO1_12_1 extends Protocol { +public class Protocol1_12_2To1_12_1 extends Protocol { @Override protected void registerPackets() { // Outgoing diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12to1_11_1/Protocol1_12To1_11_1.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12to1_11_1/Protocol1_12To1_11_1.java index 96ba56e37..f3476a84c 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12to1_11_1/Protocol1_12To1_11_1.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12to1_11_1/Protocol1_12To1_11_1.java @@ -24,7 +24,7 @@ import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.providers.InventoryQui import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.storage.EntityTracker; import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.types.Chunk1_9_3_4Type; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; public class Protocol1_12To1_11_1 extends Protocol { @@ -95,7 +95,7 @@ public class Protocol1_12To1_11_1 extends Protocol { registerOutgoing(State.PLAY, 0x0F, 0x0F, new PacketRemapper() { @Override public void registerMap() { - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 0 - Chat Message (json) + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 0 - Chat Message (json) map(Type.BYTE); // 1 - Chat Positon handler(new PacketHandler() { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/Protocol1_9_1_2TO1_9_3_4.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/Protocol1_9_1_2To1_9_3_4.java similarity index 98% rename from common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/Protocol1_9_1_2TO1_9_3_4.java rename to common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/Protocol1_9_1_2To1_9_3_4.java index 28511f53a..12821a29b 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/Protocol1_9_1_2TO1_9_3_4.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/Protocol1_9_1_2To1_9_3_4.java @@ -15,7 +15,7 @@ import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.types.Chunk1_9_3_4 import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.types.Chunk1_9_1_2Type; -public class Protocol1_9_1_2TO1_9_3_4 extends Protocol { +public class Protocol1_9_1_2To1_9_3_4 extends Protocol { @Override protected void registerPackets() { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/chunks/BlockEntity.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/chunks/BlockEntity.java index af5dcb257..f60345318 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/chunks/BlockEntity.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/chunks/BlockEntity.java @@ -7,7 +7,7 @@ import us.myles.ViaVersion.api.Via; import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.minecraft.Position; import us.myles.ViaVersion.api.type.Type; -import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.Protocol1_9_1_2TO1_9_3_4; +import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.Protocol1_9_1_2To1_9_3_4; import java.util.List; import java.util.Map; @@ -63,6 +63,6 @@ public class BlockEntity { wrapper.write(Type.POSITION, pos); wrapper.write(Type.UNSIGNED_BYTE, id); wrapper.write(Type.NBT, tag); - wrapper.send(Protocol1_9_1_2TO1_9_3_4.class, false); + wrapper.send(Protocol1_9_1_2To1_9_3_4.class, false); } } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1to1_9/Protocol1_9_1TO1_9.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1to1_9/Protocol1_9_1To1_9.java similarity index 97% rename from common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1to1_9/Protocol1_9_1TO1_9.java rename to common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1to1_9/Protocol1_9_1To1_9.java index c78468043..e6f21be97 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1to1_9/Protocol1_9_1TO1_9.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1to1_9/Protocol1_9_1To1_9.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 Protocol1_9_1TO1_9 extends Protocol { +public class Protocol1_9_1To1_9 extends Protocol { @Override protected void registerPackets() { // Currently supports 1.9.1 and 1.9.2 diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_3to1_9_1_2/Protocol1_9_3TO1_9_1_2.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_3to1_9_1_2/Protocol1_9_3To1_9_1_2.java similarity index 99% rename from common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_3to1_9_1_2/Protocol1_9_3TO1_9_1_2.java rename to common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_3to1_9_1_2/Protocol1_9_3To1_9_1_2.java index 62bcf0306..c33411427 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_3to1_9_1_2/Protocol1_9_3TO1_9_1_2.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_3to1_9_1_2/Protocol1_9_3To1_9_1_2.java @@ -19,7 +19,7 @@ import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.types.Chunk1_9_1_2Ty import java.util.List; -public class Protocol1_9_3TO1_9_1_2 extends Protocol { +public class Protocol1_9_3To1_9_1_2 extends Protocol { @Override protected void registerPackets() { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/ItemRewriter.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/ItemRewriter.java index c73af9382..4da1217a8 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/ItemRewriter.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/ItemRewriter.java @@ -261,7 +261,7 @@ public class ItemRewriter { } ListTag pages = tag.get("pages"); if (pages == null) { - pages = new ListTag("pages", Collections.singletonList(new StringTag(Protocol1_9TO1_8.fixJson("")))); + pages = new ListTag("pages", Collections.singletonList(new StringTag(Protocol1_9To1_8.fixJson("")))); tag.put(pages); item.setTag(tag); return; @@ -271,7 +271,7 @@ public class ItemRewriter { if (!(pages.get(i) instanceof StringTag)) continue; StringTag page = pages.get(i); - page.setValue(Protocol1_9TO1_8.fixJson(page.getValue())); + page.setValue(Protocol1_9To1_8.fixJson(page.getValue())); } item.setTag(tag); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/Protocol1_9TO1_8.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/Protocol1_9To1_8.java similarity index 97% rename from common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/Protocol1_9TO1_8.java rename to common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/Protocol1_9To1_8.java index 3ae52ed92..974a08940 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/Protocol1_9TO1_8.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/Protocol1_9To1_8.java @@ -18,7 +18,7 @@ import us.myles.ViaVersion.util.GsonUtil; import java.util.List; -public class Protocol1_9TO1_8 extends Protocol { +public class Protocol1_9To1_8 extends Protocol { public static final ValueTransformer FIX_JSON = new ValueTransformer(Type.STRING) { @Override public String transform(PacketWrapper wrapper, String line) { @@ -76,7 +76,7 @@ public class Protocol1_9TO1_8 extends Protocol { registerOutgoing(State.LOGIN, 0x00, 0x00, new PacketRemapper() { @Override public void registerMap() { - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 0 - Reason + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 0 - Reason } }); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/ViaIdleThread.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/ViaIdleThread.java index 675df3a22..a0b25474c 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/ViaIdleThread.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/ViaIdleThread.java @@ -10,7 +10,7 @@ public class ViaIdleThread implements Runnable { @Override public void run() { for (UserConnection info : Via.getManager().getPortedPlayers().values()) { - if (info.has(ProtocolInfo.class) && info.get(ProtocolInfo.class).getPipeline().contains(Protocol1_9TO1_8.class)) { + if (info.has(ProtocolInfo.class) && info.get(ProtocolInfo.class).getPipeline().contains(Protocol1_9To1_8.class)) { long nextIdleUpdate = info.get(MovementTracker.class).getNextIdlePacket(); if (nextIdleUpdate <= System.currentTimeMillis()) { if (info.getChannel().isOpen()) { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/metadata/MetadataRewriter.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/metadata/MetadataRewriter.java index 3fa02977c..80560530c 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/metadata/MetadataRewriter.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/metadata/MetadataRewriter.java @@ -10,7 +10,7 @@ import us.myles.ViaVersion.api.minecraft.metadata.Metadata; import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_8; import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_9; import us.myles.ViaVersion.protocols.protocol1_9to1_8.ItemRewriter; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import java.util.ArrayList; import java.util.List; @@ -117,7 +117,7 @@ public class MetadataRewriter { entry.setValue(angle); break; case Chat: - value = Protocol1_9TO1_8.fixJson((String) value); + value = Protocol1_9To1_8.fixJson((String) value); entry.setValue(value); break; default: diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/EntityPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/EntityPackets.java index 1686ae2e4..2cc173b10 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/EntityPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/EntityPackets.java @@ -17,7 +17,7 @@ import us.myles.ViaVersion.api.type.types.version.Types1_8; import us.myles.ViaVersion.api.type.types.version.Types1_9; import us.myles.ViaVersion.packets.State; import us.myles.ViaVersion.protocols.protocol1_9to1_8.ItemRewriter; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.metadata.MetadataRewriter; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.EntityTracker; @@ -62,7 +62,7 @@ public class EntityPackets { passengerPacket.write(Type.VAR_INT_ARRAY, new Integer[]{passenger}); tracker.getVehicleMap().put(passenger, vehicle); } - passengerPacket.send(Protocol1_9TO1_8.class); // Send the packet + passengerPacket.send(Protocol1_9To1_8.class); // Send the packet } return null; } @@ -162,7 +162,7 @@ public class EntityPackets { Item stack = wrapper.get(Type.ITEM, 0); if (stack != null) { - if (Protocol1_9TO1_8.isSword(stack.getId())) { + if (Protocol1_9To1_8.isSword(stack.getId())) { entityTracker.getValidBlocking().add(entityID); return; } @@ -267,7 +267,7 @@ public class EntityPackets { if (wrapper.get(Type.VAR_INT, 0) == 2) { // entity dead wrapper.passthrough(Type.VAR_INT); //Player id wrapper.passthrough(Type.INT); //Entity id - Protocol1_9TO1_8.FIX_JSON.write(wrapper, wrapper.read(Type.STRING)); + Protocol1_9To1_8.FIX_JSON.write(wrapper, wrapper.read(Type.STRING)); } } }); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/InventoryPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/InventoryPackets.java index 35d4a8e22..f0d9b77fd 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/InventoryPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/InventoryPackets.java @@ -9,7 +9,7 @@ import us.myles.ViaVersion.api.remapper.ValueCreator; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.packets.State; import us.myles.ViaVersion.protocols.protocol1_9to1_8.ItemRewriter; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.EntityTracker; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.InventoryTracker; @@ -44,7 +44,7 @@ public class InventoryPackets { wrapper.write(Type.SHORT, property); wrapper.write(Type.SHORT, enchantID); } - }).send(Protocol1_9TO1_8.class); + }).send(Protocol1_9To1_8.class); wrapper.set(Type.SHORT, 0, (short) (property + 3)); wrapper.set(Type.SHORT, 1, level); @@ -62,7 +62,7 @@ public class InventoryPackets { public void registerMap() { map(Type.UNSIGNED_BYTE); // 0 - Window ID map(Type.STRING); // 1 - Window Type - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 2 - Window Title + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 2 - Window Title map(Type.UNSIGNED_BYTE); // 3 - Slot Count // There is a horse parameter after this, we don't handle it and let it passthrough // Inventory tracking @@ -230,7 +230,7 @@ public class InventoryPackets { wrapper.write(Type.SHORT, slot); wrapper.write(Type.ITEM, null); } - }).send(Protocol1_9TO1_8.class); + }).send(Protocol1_9To1_8.class); // Finally reset to simulate throwing item wrapper.set(Type.SHORT, 0, (short) -999); // Set slot to -999 } @@ -285,7 +285,7 @@ public class InventoryPackets { wrapper.write(Type.SHORT, slot); wrapper.write(Type.ITEM, null); } - }).send(Protocol1_9TO1_8.class); + }).send(Protocol1_9To1_8.class); // Finally reset to simulate throwing item wrapper.set(Type.BYTE, 0, (byte) 0); // Set button to 0 wrapper.set(Type.BYTE, 1, (byte) 0); // Set mode to 0 diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/PlayerPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/PlayerPackets.java index b568f645e..578ca2785 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/PlayerPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/PlayerPackets.java @@ -15,7 +15,7 @@ import us.myles.ViaVersion.packets.State; import us.myles.ViaVersion.protocols.base.ProtocolInfo; import us.myles.ViaVersion.protocols.protocol1_9to1_8.ItemRewriter; import us.myles.ViaVersion.protocols.protocol1_9to1_8.PlayerMovementMapper; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.chat.ChatRewriter; import us.myles.ViaVersion.protocols.protocol1_9to1_8.chat.GameMode; import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.CommandBlockProvider; @@ -29,7 +29,7 @@ public class PlayerPackets { protocol.registerOutgoing(State.PLAY, 0x02, 0x0F, new PacketRemapper() { @Override public void registerMap() { - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 0 - Chat Message (json) + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 0 - Chat Message (json) map(Type.BYTE); // 1 - Chat Positon handler(new PacketHandler() { @@ -51,8 +51,8 @@ public class PlayerPackets { protocol.registerOutgoing(State.PLAY, 0x47, 0x48, new PacketRemapper() { @Override public void registerMap() { - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 0 - Header - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 1 - Footer + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 0 - Header + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 1 - Footer } }); @@ -60,7 +60,7 @@ public class PlayerPackets { protocol.registerOutgoing(State.PLAY, 0x40, 0x1A, new PacketRemapper() { @Override public void registerMap() { - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 0 - Reason + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 0 - Reason } }); @@ -75,7 +75,7 @@ public class PlayerPackets { public void handle(PacketWrapper wrapper) throws Exception { int action = wrapper.get(Type.VAR_INT, 0); if (action == 0 || action == 1) { - Protocol1_9TO1_8.FIX_JSON.write(wrapper, wrapper.read(Type.STRING)); + Protocol1_9To1_8.FIX_JSON.write(wrapper, wrapper.read(Type.STRING)); } } }); @@ -139,7 +139,7 @@ public class PlayerPackets { if (mode == 4) { // since removing add to auto team // Workaround for packet order issue - wrapper.send(Protocol1_9TO1_8.class, true, true); + wrapper.send(Protocol1_9To1_8.class, true, true); wrapper.cancel(); entityTracker.sendTeamPacket(true, true); entityTracker.setCurrentTeam("viaversion"); @@ -159,7 +159,7 @@ public class PlayerPackets { && teamName.equals(entityTracker.getCurrentTeam())) { // team was removed // Workaround for packet order issue - wrapper.send(Protocol1_9TO1_8.class, true, true); + wrapper.send(Protocol1_9To1_8.class, true, true); wrapper.cancel(); entityTracker.sendTeamPacket(true, true); entityTracker.setCurrentTeam("viaversion"); @@ -218,7 +218,7 @@ public class PlayerPackets { if (Via.getConfig().isAutoTeam()) { entityTracker.setAutoTeam(true); // Workaround for packet order issue - wrapper.send(Protocol1_9TO1_8.class, true, true); + wrapper.send(Protocol1_9To1_8.class, true, true); wrapper.cancel(); entityTracker.sendTeamPacket(true, true); entityTracker.setCurrentTeam("viaversion"); @@ -265,14 +265,14 @@ public class PlayerPackets { wrapper.passthrough(Type.VAR_INT); // ping boolean hasDisplayName = wrapper.passthrough(Type.BOOLEAN); if (hasDisplayName) { - Protocol1_9TO1_8.FIX_JSON.write(wrapper, wrapper.read(Type.STRING)); // display name + Protocol1_9To1_8.FIX_JSON.write(wrapper, wrapper.read(Type.STRING)); // display name } } else if ((action == 1) || (action == 2)) { // update gamemode || update latency wrapper.passthrough(Type.VAR_INT); } else if (action == 3) { // update display name boolean hasDisplayName = wrapper.passthrough(Type.BOOLEAN); if (hasDisplayName) { - Protocol1_9TO1_8.FIX_JSON.write(wrapper, wrapper.read(Type.STRING)); // display name + Protocol1_9To1_8.FIX_JSON.write(wrapper, wrapper.read(Type.STRING)); // display name } } else if (action == 4) { // remove player // no fields @@ -465,7 +465,7 @@ public class PlayerPackets { (short) (wrapper.get(Type.UNSIGNED_BYTE, 0).intValue() | 0x80) ); } - wrapper.sendToServer(Protocol1_9TO1_8.class, true, true); + wrapper.sendToServer(Protocol1_9To1_8.class, true, true); wrapper.cancel(); Via.getManager().getProviders().get(MainHandProvider.class).setMainHand(wrapper.user(), hand); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/SpawnPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/SpawnPackets.java index 1dc71045e..587fe0d12 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/SpawnPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/SpawnPackets.java @@ -16,7 +16,7 @@ import us.myles.ViaVersion.api.type.types.version.Types1_8; import us.myles.ViaVersion.api.type.types.version.Types1_9; import us.myles.ViaVersion.packets.State; import us.myles.ViaVersion.protocols.protocol1_9to1_8.ItemRewriter; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.metadata.MetadataRewriter; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.EntityTracker; @@ -111,7 +111,7 @@ public class SpawnPackets { wrapper.write(Types1_9.METADATA_LIST, meta); } }); - metaPacket.send(Protocol1_9TO1_8.class); + metaPacket.send(Protocol1_9To1_8.class); } } }); @@ -304,7 +304,7 @@ public class SpawnPackets { packet.write(Type.VAR_INT, 0); packet.write(Type.ITEM, new Item(item, (byte) 1, (short) 0, null)); try { - packet.send(Protocol1_9TO1_8.class, true, true); + packet.send(Protocol1_9To1_8.class, true, true); } catch (Exception e) { e.printStackTrace(); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java index 5e45bdade..1aabd1835 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java @@ -15,7 +15,7 @@ import us.myles.ViaVersion.api.remapper.ValueCreator; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.packets.State; import us.myles.ViaVersion.protocols.protocol1_9to1_8.ItemRewriter; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.api.minecraft.chunks.Chunk1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.BulkChunkTranslatorProvider; import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.CommandBlockProvider; @@ -36,10 +36,10 @@ public class WorldPackets { @Override public void registerMap() { map(Type.POSITION); // 0 - Sign Position - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 1 - Sign Line (json) - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 2 - Sign Line (json) - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 3 - Sign Line (json) - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 4 - Sign Line (json) + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 1 - Sign Line (json) + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 2 - Sign Line (json) + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 3 - Sign Line (json) + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 4 - Sign Line (json) } }); @@ -165,7 +165,7 @@ public class WorldPackets { output.setId(-1); // -1 for no writing of id output.writeToBuffer(buffer); PacketWrapper chunkPacket = new PacketWrapper(0x21, buffer, wrapper.user()); - chunkPacket.send(Protocol1_9TO1_8.class, false, true); + chunkPacket.send(Protocol1_9To1_8.class, false, true); buffer.release(); } } @@ -237,10 +237,10 @@ public class WorldPackets { @Override public void registerMap() { map(Type.POSITION); // 0 - Sign Position - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 1 - Sign Line (json) - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 2 - Sign Line (json) - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 3 - Sign Line (json) - map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 4 - Sign Line (json) + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 1 - Sign Line (json) + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 2 - Sign Line (json) + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 3 - Sign Line (json) + map(Type.STRING, Protocol1_9To1_8.FIX_JSON); // 4 - Sign Line (json) } }); @@ -291,12 +291,12 @@ public class WorldPackets { wrapper.write(Type.LONG, -1L); wrapper.write(Type.BYTE, (byte) 255); // Write item in hand - Item item = Protocol1_9TO1_8.getHandItem(wrapper.user()); + Item item = Protocol1_9To1_8.getHandItem(wrapper.user()); // Blocking patch if (Via.getConfig().isShieldBlocking()) { EntityTracker tracker = wrapper.user().get(EntityTracker.class); - if (item != null && Protocol1_9TO1_8.isSword(item.getId())) { + if (item != null && Protocol1_9To1_8.isSword(item.getId())) { if (hand == 0) { if (!tracker.isBlocking()) { tracker.setBlocking(true); @@ -331,7 +331,7 @@ public class WorldPackets { create(new ValueCreator() { @Override public void write(PacketWrapper wrapper) throws Exception { - Item item = Protocol1_9TO1_8.getHandItem(wrapper.user()); + Item item = Protocol1_9To1_8.getHandItem(wrapper.user()); wrapper.write(Type.ITEM, item); // 3 - Item } }); @@ -404,7 +404,7 @@ public class WorldPackets { updateBlockEntity.write(Type.UNSIGNED_BYTE, (short) 2); updateBlockEntity.write(Type.NBT, tag.get()); - updateBlockEntity.send(Protocol1_9TO1_8.class); + updateBlockEntity.send(Protocol1_9To1_8.class); } } }); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/providers/CommandBlockProvider.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/providers/CommandBlockProvider.java index 2f4a9cf8c..a2e6fb785 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/providers/CommandBlockProvider.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/providers/CommandBlockProvider.java @@ -7,7 +7,7 @@ import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.minecraft.Position; import us.myles.ViaVersion.api.platform.providers.Provider; import us.myles.ViaVersion.api.type.Type; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.CommandBlockStorage; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.EntityTracker; @@ -44,7 +44,7 @@ public class CommandBlockProvider implements Provider { wrapper.write(Type.INT, user.get(EntityTracker.class).getProvidedEntityId()); // Entity ID wrapper.write(Type.BYTE, (byte) 26); // Hardcoded op permission level - wrapper.send(Protocol1_9TO1_8.class); + wrapper.send(Protocol1_9To1_8.class); user.get(CommandBlockStorage.class).setPermissions(true); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/storage/EntityTracker.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/storage/EntityTracker.java index 5b9908a43..6cc662ca1 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/storage/EntityTracker.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/storage/EntityTracker.java @@ -20,7 +20,7 @@ import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_9; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.api.type.types.version.Types1_9; import us.myles.ViaVersion.protocols.base.ProtocolInfo; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.chat.GameMode; import us.myles.ViaVersion.protocols.protocol1_9to1_8.metadata.MetadataRewriter; import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.BossBarProvider; @@ -78,7 +78,7 @@ public class EntityTracker extends StoredObject { wrapper.write(Type.VAR_INT, 1); // slot wrapper.write(Type.ITEM, item); try { - wrapper.send(Protocol1_9TO1_8.class); + wrapper.send(Protocol1_9To1_8.class); } catch (Exception e) { e.printStackTrace(); } @@ -193,7 +193,7 @@ public class EntityTracker extends StoredObject { wrapper.write(Type.SHORT, (short) (128D * (Via.getConfig().getHologramYOffset() * 32D))); wrapper.write(Type.SHORT, (short) 0); wrapper.write(Type.BOOLEAN, true); - wrapper.send(Protocol1_9TO1_8.class, true, false); + wrapper.send(Protocol1_9To1_8.class, true, false); } catch (Exception ignored) { } } @@ -271,7 +271,7 @@ public class EntityTracker extends StoredObject { } teamExists = add; try { - wrapper.send(Protocol1_9TO1_8.class, true, now); + wrapper.send(Protocol1_9To1_8.class, true, now); } catch (Exception e) { e.printStackTrace(); } @@ -296,7 +296,7 @@ public class EntityTracker extends StoredObject { handleMetadata(entityID, metadataList); if (metadataList.size() > 0) { try { - wrapper.send(Protocol1_9TO1_8.class); + wrapper.send(Protocol1_9To1_8.class); } catch (Exception e) { e.printStackTrace(); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_9_1/Protocol1_9TO1_9_1.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_9_1/Protocol1_9To1_9_1.java similarity index 97% rename from common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_9_1/Protocol1_9TO1_9_1.java rename to common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_9_1/Protocol1_9To1_9_1.java index 44313a75b..a06b58302 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_9_1/Protocol1_9TO1_9_1.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_9_1/Protocol1_9To1_9_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 Protocol1_9TO1_9_1 extends Protocol { +public class Protocol1_9To1_9_1 extends Protocol { @Override protected void registerPackets() { // Currently supports 1.9.1 and 1.9.2 diff --git a/sponge-legacy/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/sponge4/Sponge4ArmorListener.java b/sponge-legacy/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/sponge4/Sponge4ArmorListener.java index 4e69b7061..bcd52044e 100644 --- a/sponge-legacy/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/sponge4/Sponge4ArmorListener.java +++ b/sponge-legacy/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/sponge4/Sponge4ArmorListener.java @@ -16,7 +16,7 @@ import us.myles.ViaVersion.api.Via; import us.myles.ViaVersion.api.ViaListener; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.protocols.protocol1_9to1_8.ArmorType; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import java.lang.reflect.Field; import java.util.Optional; @@ -28,7 +28,7 @@ public class Sponge4ArmorListener extends ViaListener { private static final UUID ARMOR_ATTRIBUTE = UUID.fromString("2AD3F246-FEE1-4E67-B886-69FD380BB150"); public Sponge4ArmorListener() { - super(Protocol1_9TO1_8.class); + super(Protocol1_9To1_8.class); } // @@ -54,7 +54,7 @@ public class Sponge4ArmorListener extends ViaListener { wrapper.write(Type.DOUBLE, (double) armor); // the modifier value wrapper.write(Type.BYTE, (byte) 0);// the modifier operation, 0 is add number - wrapper.send(Protocol1_9TO1_8.class); + wrapper.send(Protocol1_9To1_8.class); } catch (Exception e) { e.printStackTrace(); } diff --git a/sponge/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/BlockListener.java b/sponge/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/BlockListener.java index 482554866..09167c581 100644 --- a/sponge/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/BlockListener.java +++ b/sponge/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/BlockListener.java @@ -7,14 +7,14 @@ import org.spongepowered.api.event.filter.cause.Root; import org.spongepowered.api.world.Location; import us.myles.ViaVersion.SpongePlugin; import us.myles.ViaVersion.api.minecraft.Position; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.EntityTracker; import us.myles.ViaVersion.sponge.listeners.ViaSpongeListener; public class BlockListener extends ViaSpongeListener { public BlockListener(SpongePlugin plugin) { - super(plugin, Protocol1_9TO1_8.class); + super(plugin, Protocol1_9To1_8.class); } @Listener diff --git a/sponge/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/DeathListener.java b/sponge/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/DeathListener.java index eece82ce0..f44e3bde1 100644 --- a/sponge/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/DeathListener.java +++ b/sponge/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/DeathListener.java @@ -9,14 +9,14 @@ import us.myles.ViaVersion.SpongePlugin; import us.myles.ViaVersion.api.PacketWrapper; import us.myles.ViaVersion.api.Via; import us.myles.ViaVersion.api.type.Type; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.sponge.listeners.ViaSpongeListener; import java.util.Optional; public class DeathListener extends ViaSpongeListener { public DeathListener(SpongePlugin plugin) { - super(plugin, Protocol1_9TO1_8.class); + super(plugin, Protocol1_9To1_8.class); } @Listener(order = Order.LAST) @@ -53,9 +53,9 @@ public class DeathListener extends ViaSpongeListener { wrapper.write(Type.VAR_INT, 2); // Event - Entity dead wrapper.write(Type.VAR_INT, entityId); // Player ID wrapper.write(Type.INT, entityId); // Entity ID - Protocol1_9TO1_8.FIX_JSON.write(wrapper, msg); // Message + Protocol1_9To1_8.FIX_JSON.write(wrapper, msg); // Message - wrapper.send(Protocol1_9TO1_8.class); + wrapper.send(Protocol1_9To1_8.class); } catch (Exception e) { e.printStackTrace(); } diff --git a/sponge/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/sponge5/Sponge5ArmorListener.java b/sponge/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/sponge5/Sponge5ArmorListener.java index 6052e86b5..24fe4c91b 100644 --- a/sponge/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/sponge5/Sponge5ArmorListener.java +++ b/sponge/src/main/java/us/myles/ViaVersion/sponge/listeners/protocol1_9to1_8/sponge5/Sponge5ArmorListener.java @@ -16,7 +16,7 @@ import us.myles.ViaVersion.api.PacketWrapper; import us.myles.ViaVersion.api.Via; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.protocols.protocol1_9to1_8.ArmorType; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.sponge.listeners.ViaSpongeListener; import java.util.Optional; @@ -26,7 +26,7 @@ public class Sponge5ArmorListener extends ViaSpongeListener { private static final UUID ARMOR_ATTRIBUTE = UUID.fromString("2AD3F246-FEE1-4E67-B886-69FD380BB150"); public Sponge5ArmorListener(SpongePlugin plugin) { - super(plugin, Protocol1_9TO1_8.class); + super(plugin, Protocol1_9To1_8.class); } // @@ -52,7 +52,7 @@ public class Sponge5ArmorListener extends ViaSpongeListener { wrapper.write(Type.DOUBLE, (double) armor); // the modifier value wrapper.write(Type.BYTE, (byte) 0);// the modifier operation, 0 is add number - wrapper.send(Protocol1_9TO1_8.class); + wrapper.send(Protocol1_9To1_8.class); } catch (Exception e) { e.printStackTrace(); } diff --git a/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityServerHandler.java b/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityServerHandler.java index 3f00ee468..35f85d042 100644 --- a/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityServerHandler.java +++ b/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityServerHandler.java @@ -15,7 +15,7 @@ import us.myles.ViaVersion.api.protocol.ProtocolRegistry; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.protocols.base.ProtocolInfo; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.packets.InventoryPackets; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.util.ReflectionUtil; import us.myles.ViaVersion.velocity.service.ProtocolDetectorService; import us.myles.ViaVersion.velocity.storage.VelocityStorage; @@ -116,7 +116,7 @@ public class VelocityServerHandler { PacketWrapper wrapper = new PacketWrapper(0x0C, null, user); wrapper.write(Type.UUID, uuid); wrapper.write(Type.VAR_INT, 1); // remove - wrapper.send(Protocol1_9TO1_8.class, true, true); + wrapper.send(Protocol1_9To1_8.class, true, true); } storage.getBossbar().clear(); } diff --git a/velocity/src/main/java/us/myles/ViaVersion/velocity/listeners/ElytraPatch.java b/velocity/src/main/java/us/myles/ViaVersion/velocity/listeners/ElytraPatch.java index 0216ab4d7..4c6fabe0f 100644 --- a/velocity/src/main/java/us/myles/ViaVersion/velocity/listeners/ElytraPatch.java +++ b/velocity/src/main/java/us/myles/ViaVersion/velocity/listeners/ElytraPatch.java @@ -11,7 +11,7 @@ import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_9; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.api.type.types.version.Types1_9; import us.myles.ViaVersion.protocols.base.ProtocolInfo; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.EntityTracker; import java.util.Collections; @@ -27,7 +27,7 @@ public class ElytraPatch { if (user == null) return; try { - if (user.get(ProtocolInfo.class).getPipeline().contains(Protocol1_9TO1_8.class)) { + if (user.get(ProtocolInfo.class).getPipeline().contains(Protocol1_9To1_8.class)) { int entityId = user.get(EntityTracker.class).getProvidedEntityId(); PacketWrapper wrapper = new PacketWrapper(0x39, null, user); @@ -35,7 +35,7 @@ public class ElytraPatch { wrapper.write(Type.VAR_INT, entityId); wrapper.write(Types1_9.METADATA_LIST, Collections.singletonList(new Metadata(0, MetaType1_9.Byte, (byte) 0))); - wrapper.send(Protocol1_9TO1_8.class); + wrapper.send(Protocol1_9To1_8.class); } } catch (Exception e) { e.printStackTrace(); diff --git a/velocity/src/main/java/us/myles/ViaVersion/velocity/providers/VelocityMovementTransmitter.java b/velocity/src/main/java/us/myles/ViaVersion/velocity/providers/VelocityMovementTransmitter.java index 473633790..affbe2b06 100644 --- a/velocity/src/main/java/us/myles/ViaVersion/velocity/providers/VelocityMovementTransmitter.java +++ b/velocity/src/main/java/us/myles/ViaVersion/velocity/providers/VelocityMovementTransmitter.java @@ -5,7 +5,7 @@ import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.packets.State; import us.myles.ViaVersion.protocols.base.ProtocolInfo; -import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; +import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider; import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.MovementTracker; @@ -25,7 +25,7 @@ public class VelocityMovementTransmitter extends MovementTransmitterProvider { PacketWrapper wrapper = new PacketWrapper(0x03, null, userConnection); wrapper.write(Type.BOOLEAN, userConnection.get(MovementTracker.class).isGround()); try { - wrapper.sendToServer(Protocol1_9TO1_8.class); + wrapper.sendToServer(Protocol1_9To1_8.class); } catch (Exception e) { e.printStackTrace(); }