3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 00:22:51 +01:00

Fix zombie metadata in 1.10->1.11

Dieser Commit ist enthalten in:
FlorianMichael 2024-04-21 11:24:20 +02:00
Ursprung 0acaed7c7a
Commit b9e92e5c1f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: C2FB87E71C425126
2 geänderte Dateien mit 1 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -61,8 +61,6 @@ public class MetadataRewriter1_11To1_10 extends EntityRewriter<ClientboundPacket
event.cancel(); event.cancel();
} else if (meta.id() == 15) { } else if (meta.id() == 15) {
meta.setId(14); meta.setId(14);
} else if (meta.id() == 14) {
meta.setId(15);
} }
}); });
@ -110,7 +108,7 @@ public class MetadataRewriter1_11To1_10 extends EntityRewriter<ClientboundPacket
byte data = meta.value(); byte data = meta.value();
// Check invisible | Check small | Check if custom name is empty | Check if custom name visible is true // Check invisible | Check small | Check if custom name is empty | Check if custom name visible is true
if ((data & 0x20) == 0x20 && ((byte) flags.getValue() & 0x01) == 0x01 if ((data & 0x20) == 0x20 && ((byte) flags.getValue() & 0x01) == 0x01
&& !((String) customName.getValue()).isEmpty() && (boolean) customNameVisible.getValue()) { && !((String) customName.getValue()).isEmpty() && (boolean) customNameVisible.getValue()) {
EntityTracker1_11 tracker = tracker(event.user()); EntityTracker1_11 tracker = tracker(event.user());
int entityId = event.entityId(); int entityId = event.entityId();
if (tracker.addHologram(entityId)) { if (tracker.addHologram(entityId)) {

Datei anzeigen

@ -376,8 +376,6 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
null null
); );
filter().type(EntityTypes1_20_5.ZOMBIFIED_PIGLIN).removeIndex(19); // TODO Somewhere between 1.8 and 1.11 we most likely have bad handling
filter().type(EntityTypes1_20_5.LIVINGENTITY).index(10).handler((event, meta) -> { filter().type(EntityTypes1_20_5.LIVINGENTITY).index(10).handler((event, meta) -> {
final int effectColor = meta.value(); final int effectColor = meta.value();
final Particle particle = new Particle(protocol.getMappingData().getParticleMappings().mappedId("entity_effect")); final Particle particle = new Particle(protocol.getMappingData().getParticleMappings().mappedId("entity_effect"));