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:
Ursprung
0cd46fdac9
Commit
948c615622
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren