mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-25 18:07:45 +01:00
parent
204a81b0ea
commit
206368b777
@ -53,8 +53,11 @@ public class EntityPackets {
|
|||||||
int entityId = wrapper.get(Type.VAR_INT, 0);
|
int entityId = wrapper.get(Type.VAR_INT, 0);
|
||||||
byte type = wrapper.get(Type.BYTE, 0);
|
byte type = wrapper.get(Type.BYTE, 0);
|
||||||
Entity1_13Types.EntityType entType = Entity1_13Types.getTypeFromId(type, true);
|
Entity1_13Types.EntityType entType = Entity1_13Types.getTypeFromId(type, true);
|
||||||
|
if (entType == null) return;
|
||||||
|
|
||||||
|
// Register Type ID
|
||||||
|
wrapper.user().getEntityTracker(Protocol1_13To1_12_2.class).addEntity(entityId, entType);
|
||||||
|
|
||||||
if (entType != null) {
|
|
||||||
if (entType.is(Entity1_13Types.EntityType.FALLING_BLOCK)) {
|
if (entType.is(Entity1_13Types.EntityType.FALLING_BLOCK)) {
|
||||||
int oldId = wrapper.get(Type.INT, 0);
|
int oldId = wrapper.get(Type.INT, 0);
|
||||||
int combined = (((oldId & 4095) << 4) | (oldId >> 12 & 15));
|
int combined = (((oldId & 4095) << 4) | (oldId >> 12 & 15));
|
||||||
@ -82,10 +85,6 @@ public class EntityPackets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wrapper.set(Type.INT, 0, data);
|
wrapper.set(Type.INT, 0, data);
|
||||||
|
|
||||||
// Register Type ID
|
|
||||||
wrapper.user().getEntityTracker(Protocol1_13To1_12_2.class).addEntity(entityId, entType);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user