From 284a2a67a2f33f93f52609bb78d4dbafdb9f5523 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Tue, 31 Jul 2018 23:45:07 -0400 Subject: [PATCH] Remove unused entity remapper. --- .../remap/Minecraft18EntityIdRemapper.java | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 proxy/src/main/java/com.velocitypowered/proxy/protocol/remap/Minecraft18EntityIdRemapper.java diff --git a/proxy/src/main/java/com.velocitypowered/proxy/protocol/remap/Minecraft18EntityIdRemapper.java b/proxy/src/main/java/com.velocitypowered/proxy/protocol/remap/Minecraft18EntityIdRemapper.java deleted file mode 100644 index e1d186b01..000000000 --- a/proxy/src/main/java/com.velocitypowered/proxy/protocol/remap/Minecraft18EntityIdRemapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.velocitypowered.proxy.protocol.remap; - -import com.velocitypowered.proxy.protocol.ProtocolConstants; -import io.netty.buffer.ByteBuf; - -public class Minecraft18EntityIdRemapper implements EntityIdRemapper { - private final int clientId; - private int serverId; - - public Minecraft18EntityIdRemapper(int clientId, int serverId) { - this.clientId = clientId; - this.serverId = serverId; - } - - @Override - public ByteBuf remap(ByteBuf original, ProtocolConstants.Direction direction) { - if (clientId == serverId) { - // If these are equal (i.e. first connection), no remapping is required. - return original.retain(); - } - - // TODO: Implement. - throw new UnsupportedOperationException("1.8 doesn't allow switching servers."); - } - - @Override - public int getClientEntityId() { - return clientId; - } - - @Override - public int getServerEntityId() { - return serverId; - } - - @Override - public void setServerEntityId(int id) { - this.serverId = id; - } -}