diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_3to1_19_4/packets/EntityPackets1_19_4.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_3to1_19_4/packets/EntityPackets1_19_4.java index 4b568f25..9b2afe54 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_3to1_19_4/packets/EntityPackets1_19_4.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_3to1_19_4/packets/EntityPackets1_19_4.java @@ -43,7 +43,31 @@ public final class EntityPackets1_19_4 extends EntityRewriter { + if (typeFromId(wrapper.get(Type.VAR_INT, 1)) == EntityTypes1_19_4.BLOCK_DISPLAY) { + wrapper.set(Type.VAR_INT, 1, EntityTypes1_19_4.FALLING_BLOCK.getId()); + wrapper.set(Type.VAR_INT, 2, 1); + wrapper.set(Type.DOUBLE, 0, wrapper.get(Type.DOUBLE, 0) + 0.5); + wrapper.set(Type.DOUBLE, 2, wrapper.get(Type.DOUBLE, 2) + 0.5); + } + }); + handler(getSpawnTrackerWithDataHandler1_19(EntityTypes1_19_4.FALLING_BLOCK)); + } + }); + registerRemoveEntities(ClientboundPackets1_19_4.REMOVE_ENTITIES); registerMetadataRewriter(ClientboundPackets1_19_4.ENTITY_METADATA, Types1_19_4.METADATA_LIST, Types1_19_3.METADATA_LIST); @@ -157,6 +181,7 @@ public final class EntityPackets1_19_4 extends EntityRewriter { // Send as custom display name event.setIndex(2); @@ -166,13 +191,17 @@ public final class EntityPackets1_19_4 extends EntityRewriter { - // TODO Maybe spawn an extra entity to ride the armor stand for blocks and items - // Remove a large heap of display metadata - if (event.index() > 7) { - event.cancel(); - } + filter().type(EntityTypes1_19_4.ITEM_DISPLAY).index(22).handler((event, meta) -> { + event.setIndex(8); + event.createExtraMeta(new Metadata(5, Types1_19_3.META_TYPES.booleanType, true)); // No gravity }); + for (int i = 9; i < 22; i++) { + filter().type(EntityTypes1_19_4.DISPLAY).cancel(i); + /* + Interpolation Duration, Translation, scale, rotation left, rotation right, billboard constraints, + brightness override, view range, shadow radius, shadow strength, width, height, glow color override + */ + } filter().type(EntityTypes1_19_4.INTERACTION).removeIndex(8); // Width filter().type(EntityTypes1_19_4.INTERACTION).removeIndex(9); // Height @@ -182,6 +211,10 @@ public final class EntityPackets1_19_4 extends EntityRewriter + event.createExtraMeta(new Metadata(5, Types1_19_3.META_TYPES.booleanType, true)) // No gravity + ); } @Override @@ -194,8 +227,7 @@ public final class EntityPackets1_19_4 extends EntityRewriter