3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

@Override and protected

Dieser Commit ist enthalten in:
Gerrygames 2019-05-09 14:46:24 +02:00
Ursprung 23b68a867c
Commit 44183f19cd
5 geänderte Dateien mit 9 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -20,7 +20,8 @@ import java.util.Map;
public class MetadataRewriter1_11To1_10 extends MetadataRewriter<Entity1_11Types.EntityType> { 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) { if (metadata.getValue() instanceof Item) {
// Apply rewrite // Apply rewrite
EntityIdRewriter.toClientItem((Item) metadata.getValue()); EntityIdRewriter.toClientItem((Item) metadata.getValue());

Datei anzeigen

@ -12,7 +12,8 @@ import java.util.List;
public class MetadataRewriter1_12To1_11_1 extends MetadataRewriter<Entity1_12Types.EntityType> { 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) { if (metadata.getValue() instanceof Item) {
// Apply rewrite // Apply rewrite
BedRewriter.toClientItem((Item) metadata.getValue()); BedRewriter.toClientItem((Item) metadata.getValue());

Datei anzeigen

@ -14,7 +14,8 @@ import java.util.List;
public class MetadataRewriter1_13_1To1_13 extends MetadataRewriter<Entity1_13Types.EntityType> { 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) // 1.13 changed item to flat item (no data)
if (metadata.getMetaType() == MetaType1_13.Slot) { if (metadata.getMetaType() == MetaType1_13.Slot) {
InventoryPackets.toClient((Item) metadata.getValue()); InventoryPackets.toClient((Item) metadata.getValue());

Datei anzeigen

@ -18,7 +18,8 @@ import java.util.Map;
public class MetadataRewriter1_13To1_12_2 extends MetadataRewriter<Entity1_13Types.EntityType> { 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 // Handle new MetaTypes
if (metadata.getMetaType().getTypeID() > 4) { if (metadata.getMetaType().getTypeID() > 4) {
metadata.setMetaType(MetaType1_13.byId(metadata.getMetaType().getTypeID() + 1)); metadata.setMetaType(MetaType1_13.byId(metadata.getMetaType().getTypeID() + 1));

Datei anzeigen

@ -20,7 +20,7 @@ import java.util.List;
public class MetadataRewriter1_14To1_13_2 extends MetadataRewriter<Entity1_14Types.EntityType> { public class MetadataRewriter1_14To1_13_2 extends MetadataRewriter<Entity1_14Types.EntityType> {
@Override @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())); metadata.setMetaType(MetaType1_14.byId(metadata.getMetaType().getTypeID()));
EntityTracker1_14 tracker = connection.get(EntityTracker1_14.class); EntityTracker1_14 tracker = connection.get(EntityTracker1_14.class);