@Override and protected

This commit is contained in:
Gerrygames 2019-05-09 14:46:24 +02:00
parent 23b68a867c
commit 44183f19cd
5 changed files with 9 additions and 5 deletions

View File

@ -20,7 +20,8 @@ import java.util.Map;
public class MetadataRewriter1_11To1_10 extends MetadataRewriter<Entity1_11Types.EntityType> {
public void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, Map<Integer, Metadata> metadataMap, UserConnection connection) {
@Override
protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, Map<Integer, Metadata> metadataMap, UserConnection connection) {
if (metadata.getValue() instanceof Item) {
// Apply rewrite
EntityIdRewriter.toClientItem((Item) metadata.getValue());

View File

@ -12,7 +12,8 @@ import java.util.List;
public class MetadataRewriter1_12To1_11_1 extends MetadataRewriter<Entity1_12Types.EntityType> {
public void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) {
@Override
protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) {
if (metadata.getValue() instanceof Item) {
// Apply rewrite
BedRewriter.toClientItem((Item) metadata.getValue());

View File

@ -14,7 +14,8 @@ import java.util.List;
public class MetadataRewriter1_13_1To1_13 extends MetadataRewriter<Entity1_13Types.EntityType> {
public void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) {
@Override
protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) {
// 1.13 changed item to flat item (no data)
if (metadata.getMetaType() == MetaType1_13.Slot) {
InventoryPackets.toClient((Item) metadata.getValue());

View File

@ -18,7 +18,8 @@ import java.util.Map;
public class MetadataRewriter1_13To1_12_2 extends MetadataRewriter<Entity1_13Types.EntityType> {
public void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, Map<Integer, Metadata> metadataMap, UserConnection connection) throws Exception {
@Override
protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, Map<Integer, Metadata> metadataMap, UserConnection connection) throws Exception {
// Handle new MetaTypes
if (metadata.getMetaType().getTypeID() > 4) {
metadata.setMetaType(MetaType1_13.byId(metadata.getMetaType().getTypeID() + 1));

View File

@ -20,7 +20,7 @@ import java.util.List;
public class MetadataRewriter1_14To1_13_2 extends MetadataRewriter<Entity1_14Types.EntityType> {
@Override
public void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) throws Exception {
protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) throws Exception {
metadata.setMetaType(MetaType1_14.byId(metadata.getMetaType().getTypeID()));
EntityTracker1_14 tracker = connection.get(EntityTracker1_14.class);