Handle shifted 1.19.4 boat types

This commit is contained in:
Nassim Jahnke 2023-03-18 12:27:46 +01:00
parent eb6e9e016a
commit a07550363e
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B

View File

@ -149,6 +149,13 @@ public final class EntityPackets1_19_4 extends EntityRewriter<ClientboundPackets
meta.setValue(protocol.getMappingData().getNewBlockStateId(blockState));
});
filter().filterFamily(Entity1_19_4Types.BOAT).index(11).handler((event, meta) -> {
final int boatType = meta.value();
if (boatType > 4) { // Cherry
meta.setValue(boatType - 1);
}
});
filter().type(Entity1_19_4Types.TEXT_DISPLAY).index(22).handler(((event, meta) -> {
// Send as custom display name
event.setIndex(2);