From 44183f19cd4bbcd47019df4a0b4ffd4e481c6d28 Mon Sep 17 00:00:00 2001 From: Gerrygames Date: Thu, 9 May 2019 14:46:24 +0200 Subject: [PATCH] @Override and protected --- .../metadata/MetadataRewriter1_11To1_10.java | 3 ++- .../metadata/MetadataRewriter1_12To1_11_1.java | 3 ++- .../metadata/MetadataRewriter1_13_1To1_13.java | 3 ++- .../metadata/MetadataRewriter1_13To1_12_2.java | 3 ++- .../metadata/MetadataRewriter1_14To1_13_2.java | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/metadata/MetadataRewriter1_11To1_10.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/metadata/MetadataRewriter1_11To1_10.java index e12421252..c14a8ab7b 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/metadata/MetadataRewriter1_11To1_10.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/metadata/MetadataRewriter1_11To1_10.java @@ -20,7 +20,8 @@ import java.util.Map; public class MetadataRewriter1_11To1_10 extends MetadataRewriter { - public void handleMetadata(int entityId, EntityType type, Metadata metadata, List metadatas, Map metadataMap, UserConnection connection) { + @Override + protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List metadatas, Map metadataMap, UserConnection connection) { if (metadata.getValue() instanceof Item) { // Apply rewrite EntityIdRewriter.toClientItem((Item) metadata.getValue()); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12to1_11_1/metadata/MetadataRewriter1_12To1_11_1.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12to1_11_1/metadata/MetadataRewriter1_12To1_11_1.java index f3a9a13cb..32b119c13 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12to1_11_1/metadata/MetadataRewriter1_12To1_11_1.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12to1_11_1/metadata/MetadataRewriter1_12To1_11_1.java @@ -12,7 +12,8 @@ import java.util.List; public class MetadataRewriter1_12To1_11_1 extends MetadataRewriter { - public void handleMetadata(int entityId, EntityType type, Metadata metadata, List metadatas, UserConnection connection) { + @Override + protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List metadatas, UserConnection connection) { if (metadata.getValue() instanceof Item) { // Apply rewrite BedRewriter.toClientItem((Item) metadata.getValue()); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13_1to1_13/metadata/MetadataRewriter1_13_1To1_13.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13_1to1_13/metadata/MetadataRewriter1_13_1To1_13.java index 9199dd26c..b7a4c02be 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13_1to1_13/metadata/MetadataRewriter1_13_1To1_13.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13_1to1_13/metadata/MetadataRewriter1_13_1To1_13.java @@ -14,7 +14,8 @@ import java.util.List; public class MetadataRewriter1_13_1To1_13 extends MetadataRewriter { - public void handleMetadata(int entityId, EntityType type, Metadata metadata, List metadatas, UserConnection connection) { + @Override + protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List metadatas, UserConnection connection) { // 1.13 changed item to flat item (no data) if (metadata.getMetaType() == MetaType1_13.Slot) { InventoryPackets.toClient((Item) metadata.getValue()); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/metadata/MetadataRewriter1_13To1_12_2.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/metadata/MetadataRewriter1_13To1_12_2.java index 2353a8a75..fdb7b3436 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/metadata/MetadataRewriter1_13To1_12_2.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/metadata/MetadataRewriter1_13To1_12_2.java @@ -18,7 +18,8 @@ import java.util.Map; public class MetadataRewriter1_13To1_12_2 extends MetadataRewriter { - public void handleMetadata(int entityId, EntityType type, Metadata metadata, List metadatas, Map metadataMap, UserConnection connection) throws Exception { + @Override + protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List metadatas, Map metadataMap, UserConnection connection) throws Exception { // Handle new MetaTypes if (metadata.getMetaType().getTypeID() > 4) { metadata.setMetaType(MetaType1_13.byId(metadata.getMetaType().getTypeID() + 1)); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/metadata/MetadataRewriter1_14To1_13_2.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/metadata/MetadataRewriter1_14To1_13_2.java index 93fab0b04..11270f48c 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/metadata/MetadataRewriter1_14To1_13_2.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/metadata/MetadataRewriter1_14To1_13_2.java @@ -20,7 +20,7 @@ import java.util.List; public class MetadataRewriter1_14To1_13_2 extends MetadataRewriter { @Override - public void handleMetadata(int entityId, EntityType type, Metadata metadata, List metadatas, UserConnection connection) throws Exception { + protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List metadatas, UserConnection connection) throws Exception { metadata.setMetaType(MetaType1_14.byId(metadata.getMetaType().getTypeID())); EntityTracker1_14 tracker = connection.get(EntityTracker1_14.class);