mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-22 16:57:40 +01:00
Fix explosion packet
This commit is contained in:
parent
62b321b7e9
commit
f498d59303
@ -145,6 +145,7 @@ public class Protocol1_16_4To1_17 extends BackwardsProtocol<ClientboundPackets1_
|
||||
map(Type.FLOAT); // X
|
||||
map(Type.FLOAT); // Y
|
||||
map(Type.FLOAT); // Z
|
||||
map(Type.FLOAT); // Strength
|
||||
handler(wrapper -> {
|
||||
wrapper.write(Type.INT, wrapper.read(Type.VAR_INT)); // Collection length
|
||||
});
|
||||
|
@ -73,10 +73,10 @@ public class EntityPackets1_17 extends EntityRewriter<Protocol1_16_4To1_17> {
|
||||
ListTag dimensions = dimensionRegistry.get("value");
|
||||
for (Tag dimension : dimensions) {
|
||||
CompoundTag dimensionCompound = ((CompoundTag) dimension).get("element");
|
||||
reduceForExtendedHeight(dimensionCompound, false);
|
||||
reduceExtendedHeight(dimensionCompound, false);
|
||||
}
|
||||
|
||||
reduceForExtendedHeight(wrapper.get(Type.NBT, 1), true);
|
||||
reduceExtendedHeight(wrapper.get(Type.NBT, 1), true);
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -86,7 +86,7 @@ public class EntityPackets1_17 extends EntityRewriter<Protocol1_16_4To1_17> {
|
||||
map(Type.NBT); // Dimension data
|
||||
handler(getWorldDataTracker(0));
|
||||
handler(wrapper -> {
|
||||
reduceForExtendedHeight(wrapper.get(Type.NBT, 0), true);
|
||||
reduceExtendedHeight(wrapper.get(Type.NBT, 0), true);
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -189,7 +189,7 @@ public class EntityPackets1_17 extends EntityRewriter<Protocol1_16_4To1_17> {
|
||||
return Entity1_17Types.getTypeFromId(typeId);
|
||||
}
|
||||
|
||||
private void reduceForExtendedHeight(CompoundTag tag, boolean warn) {
|
||||
private void reduceExtendedHeight(CompoundTag tag, boolean warn) {
|
||||
IntTag minY = tag.get("min_y");
|
||||
IntTag height = tag.get("height");
|
||||
IntTag logicalHeight = tag.get("logical_height");
|
||||
|
Loading…
Reference in New Issue
Block a user