3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-25 15:50:12 +01:00

Fix sniffer entity data removal

Fixes #757
Dieser Commit ist enthalten in:
Nassim Jahnke 2024-05-22 10:11:09 +02:00
Ursprung 0618037a0e
Commit fe4986b042
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
3 geänderte Dateien mit 7 neuen und 18 gelöschten Zeilen

Datei anzeigen

@ -351,18 +351,7 @@ public class EntityPacketRewriter1_14 extends LegacyEntityRewriter<ClientboundPa
filter().type(EntityTypes1_14.CAT).cancel(19);
filter().type(EntityTypes1_14.CAT).cancel(20);
filter().handler((event, meta) -> {
EntityType type = event.entityType();
if (type == null) return;
if (type.isOrHasParent(EntityTypes1_14.ABSTRACT_ILLAGER) || type == EntityTypes1_14.RAVAGER || type == EntityTypes1_14.WITCH) {
int index = event.index();
if (index == 14) {
event.cancel();
} else if (index > 14) {
event.setIndex(index - 1);
}
}
});
filter().type(EntityTypes1_14.ABSTRACT_RAIDER).removeIndex(14); // Celebrating
filter().type(EntityTypes1_14.AREA_EFFECT_CLOUD).index(10).handler((event, meta) -> {
rewriteParticle(event.user(), (Particle) meta.getValue());

Datei anzeigen

@ -240,7 +240,7 @@ public final class EntityPacketRewriter1_19_3 extends EntityRewriter<Clientbound
registerMetaTypeHandler(Types1_19.ENTITY_DATA_TYPES.itemType, null, Types1_19.ENTITY_DATA_TYPES.optionalBlockStateType, Types1_19.ENTITY_DATA_TYPES.particleType,
Types1_19.ENTITY_DATA_TYPES.componentType, Types1_19.ENTITY_DATA_TYPES.optionalComponentType);
filter().index(6).handler((event, meta) -> {
filter().dataType(Types1_19.ENTITY_DATA_TYPES.poseType).handler((event, meta) -> {
// Sitting pose added
final int pose = meta.value();
if (pose == 10) {

Datei anzeigen

@ -173,12 +173,12 @@ public final class EntityPacketRewriter1_19_4 extends EntityRewriter<Clientbound
}
});
filter().type(EntityTypes1_19_4.INTERACTION).removeIndex(8); // Width
filter().type(EntityTypes1_19_4.INTERACTION).removeIndex(9); // Height
filter().type(EntityTypes1_19_4.INTERACTION).removeIndex(10); // Response
filter().type(EntityTypes1_19_4.INTERACTION).cancel(8); // Width
filter().type(EntityTypes1_19_4.INTERACTION).cancel(9); // Height
filter().type(EntityTypes1_19_4.INTERACTION).cancel(10); // Response
filter().type(EntityTypes1_19_4.SNIFFER).removeIndex(17); // State
filter().type(EntityTypes1_19_4.SNIFFER).removeIndex(18); // Drop seed at tick
filter().type(EntityTypes1_19_4.SNIFFER).cancel(17); // State
filter().type(EntityTypes1_19_4.SNIFFER).cancel(18); // Drop seed at tick
filter().type(EntityTypes1_19_4.ABSTRACT_HORSE).addIndex(18); // Owner UUID
}