Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-08 17:20:24 +01:00
Ursprung
9aa7f5e879
Commit
e67501cde3
@ -228,7 +228,7 @@ public enum Entity1_19Types implements EntityType {
|
|||||||
private static final EntityType[] TYPES = EntityTypeUtil.createSizedArray(values());
|
private static final EntityType[] TYPES = EntityTypeUtil.createSizedArray(values());
|
||||||
private final EntityType parent;
|
private final EntityType parent;
|
||||||
private final String identifier;
|
private final String identifier;
|
||||||
private int id;
|
private int id = -1;
|
||||||
|
|
||||||
Entity1_19Types(final EntityType parent) {
|
Entity1_19Types(final EntityType parent) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
@ -243,7 +243,7 @@ public enum Entity1_19Types implements EntityType {
|
|||||||
@Override
|
@Override
|
||||||
public int getId() {
|
public int getId() {
|
||||||
if (id == -1) {
|
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;
|
return id;
|
||||||
}
|
}
|
||||||
|
@ -159,8 +159,9 @@ public final class EntityPackets extends EntityRewriter<Protocol1_19To1_18_2> {
|
|||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
map(Type.VAR_INT); // Entity id
|
map(Type.VAR_INT); // Entity id
|
||||||
map(Type.UUID); // Entity UUID
|
map(Type.UUID); // Entity UUID
|
||||||
create(Type.VAR_INT, Entity1_19Types.PAINTING.getId());
|
|
||||||
handler(wrapper -> {
|
handler(wrapper -> {
|
||||||
|
wrapper.write(Type.VAR_INT, Entity1_19Types.PAINTING.getId());
|
||||||
|
|
||||||
final int motive = wrapper.read(Type.VAR_INT);
|
final int motive = wrapper.read(Type.VAR_INT);
|
||||||
final Position blockPosition = wrapper.read(Type.POSITION1_14);
|
final Position blockPosition = wrapper.read(Type.POSITION1_14);
|
||||||
final byte direction = wrapper.read(Type.BYTE);
|
final byte direction = wrapper.read(Type.BYTE);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren