mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-21 12:07:38 +01:00
Replace LegacyEntityRewriter#getObjectTypeFromId with existing method (#723)
This commit is contained in:
parent
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user