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

Replace LegacyEntityRewriter#getObjectTypeFromId with existing method (#723)

Dieser Commit ist enthalten in:
EnZaXD 2024-04-22 23:30:15 +02:00 committet von GitHub
Ursprung 0cd46fdac9
Commit 948c615622
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
7 geänderte Dateien mit 7 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -132,7 +132,7 @@ public abstract class LegacyEntityRewriter<C extends ClientboundPacketType, T ex
}
protected PacketHandler getObjectTrackerHandler() {
return wrapper -> addTrackedEntity(wrapper, wrapper.get(Type.VAR_INT, 0), getObjectTypeFromId(wrapper.get(Type.BYTE, 0)));
return wrapper -> addTrackedEntity(wrapper, wrapper.get(Type.VAR_INT, 0), objectTypeFromId(wrapper.get(Type.BYTE, 0)));
}
protected PacketHandler getTrackerAndMetaHandler(Type<List<Metadata>> metaType, EntityType entityType) {
@ -161,10 +161,6 @@ public abstract class LegacyEntityRewriter<C extends ClientboundPacketType, T ex
};
}
protected EntityType getObjectTypeFromId(int typeId) {
return typeFromId(typeId);
}
@Deprecated
protected void addTrackedEntity(PacketWrapper wrapper, int entityId, EntityType type) throws Exception {
tracker(wrapper.user()).addEntity(entityId, type);

Datei anzeigen

@ -380,7 +380,7 @@ public class EntityPackets1_11 extends LegacyEntityRewriter<ClientboundPackets1_
}
@Override
protected EntityType getObjectTypeFromId(int typeId) {
public EntityType objectTypeFromId(int typeId) {
return EntityTypes1_11.getTypeFromId(typeId, true);
}
}

Datei anzeigen

@ -290,7 +290,7 @@ public class EntityPackets1_12 extends LegacyEntityRewriter<ClientboundPackets1_
}
@Override
protected EntityType getObjectTypeFromId(final int typeId) {
public EntityType objectTypeFromId(int typeId) {
return EntityTypes1_12.getTypeFromId(typeId, true);
}
}

Datei anzeigen

@ -121,7 +121,7 @@ public class EntityPackets1_11_1 extends LegacyEntityRewriter<ClientboundPackets
}
@Override
protected EntityType getObjectTypeFromId(final int typeId) {
public EntityType objectTypeFromId(int typeId) {
return EntityTypes1_11.getTypeFromId(typeId, true);
}
}

Datei anzeigen

@ -362,7 +362,7 @@ public class EntityPackets1_13 extends LegacyEntityRewriter<ClientboundPackets1_
}
@Override
protected EntityType getObjectTypeFromId(final int typeId) {
public EntityType objectTypeFromId(int typeId) {
return EntityTypes1_13.getTypeFromId(typeId, true);
}

Datei anzeigen

@ -168,7 +168,7 @@ public class EntityPackets1_13_1 extends LegacyEntityRewriter<ClientboundPackets
}
@Override
protected EntityType getObjectTypeFromId(final int typeId) {
public EntityType objectTypeFromId(int typeId) {
return EntityTypes1_13.getTypeFromId(typeId, true);
}
}

Datei anzeigen

@ -165,7 +165,7 @@ public class EntityPackets1_10 extends LegacyEntityRewriter<ClientboundPackets1_
}
@Override
protected EntityType getObjectTypeFromId(int typeId) {
public EntityType objectTypeFromId(int typeId) {
return EntityTypes1_10.getTypeFromId(typeId, true);
}
}