mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 10:05:12 +01:00
parent
9aa7f5e879
commit
e67501cde3
@ -228,7 +228,7 @@ public enum Entity1_19Types implements EntityType {
|
||||
private static final EntityType[] TYPES = EntityTypeUtil.createSizedArray(values());
|
||||
private final EntityType parent;
|
||||
private final String identifier;
|
||||
private int id;
|
||||
private int id = -1;
|
||||
|
||||
Entity1_19Types(final EntityType parent) {
|
||||
this.parent = parent;
|
||||
@ -243,7 +243,7 @@ public enum Entity1_19Types implements EntityType {
|
||||
@Override
|
||||
public int getId() {
|
||||
if (id == -1) {
|
||||
throw new IllegalStateException("Ids have not been initialized yet");
|
||||
throw new IllegalStateException("Ids have not been initialized yet (type " + name() + ")");
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
@ -159,8 +159,9 @@ public final class EntityPackets extends EntityRewriter<Protocol1_19To1_18_2> {
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT); // Entity id
|
||||
map(Type.UUID); // Entity UUID
|
||||
create(Type.VAR_INT, Entity1_19Types.PAINTING.getId());
|
||||
handler(wrapper -> {
|
||||
wrapper.write(Type.VAR_INT, Entity1_19Types.PAINTING.getId());
|
||||
|
||||
final int motive = wrapper.read(Type.VAR_INT);
|
||||
final Position blockPosition = wrapper.read(Type.POSITION1_14);
|
||||
final byte direction = wrapper.read(Type.BYTE);
|
||||
|
Loading…
Reference in New Issue
Block a user