Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 00:50:13 +01:00
Merge remote-tracking branch 'origin/master' into dev
Dieser Commit ist enthalten in:
Commit
431f773b77
@ -163,13 +163,18 @@ public class EntityPackets {
|
|||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
handler(wrapper -> {
|
handler(wrapper -> {
|
||||||
int entityId = wrapper.passthrough(Type.VAR_INT);
|
int entityId = wrapper.passthrough(Type.VAR_INT);
|
||||||
|
byte type = wrapper.read(Type.BYTE);
|
||||||
|
if (type != 1) {
|
||||||
|
// Cancel if not lightning/invalid id
|
||||||
|
wrapper.cancel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
wrapper.user().getEntityTracker(Protocol1_16To1_15_2.class).addEntity(entityId, Entity1_16Types.LIGHTNING_BOLT);
|
wrapper.user().getEntityTracker(Protocol1_16To1_15_2.class).addEntity(entityId, Entity1_16Types.LIGHTNING_BOLT);
|
||||||
|
|
||||||
wrapper.write(Type.UUID, UUID.randomUUID()); // uuid
|
wrapper.write(Type.UUID, UUID.randomUUID()); // uuid
|
||||||
wrapper.write(Type.VAR_INT, Entity1_16Types.LIGHTNING_BOLT.getId()); // entity type
|
wrapper.write(Type.VAR_INT, Entity1_16Types.LIGHTNING_BOLT.getId()); // entity type
|
||||||
|
|
||||||
wrapper.read(Type.BYTE); // remove type
|
|
||||||
|
|
||||||
wrapper.passthrough(Type.DOUBLE); // x
|
wrapper.passthrough(Type.DOUBLE); // x
|
||||||
wrapper.passthrough(Type.DOUBLE); // y
|
wrapper.passthrough(Type.DOUBLE); // y
|
||||||
wrapper.passthrough(Type.DOUBLE); // z
|
wrapper.passthrough(Type.DOUBLE); // z
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren