Fix double remapping of area effect cloud particle in 1.20.2->.3

Fixes #4042
This commit is contained in:
Nassim Jahnke 2024-08-07 15:36:06 +02:00
parent f39b466ac0
commit 274f98c24e
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
2 changed files with 7 additions and 8 deletions

View File

@ -125,8 +125,6 @@ public final class EntityPacketRewriter1_20_3 extends EntityRewriter<Clientbound
particle.add(0, Types.VAR_INT, 1);
}
}
rewriteParticle(event.user(), particle);
});
registerEntityDataTypeHandler(
@ -134,7 +132,8 @@ public final class EntityPacketRewriter1_20_3 extends EntityRewriter<Clientbound
Types1_20_3.ENTITY_DATA_TYPES.blockStateType,
Types1_20_3.ENTITY_DATA_TYPES.optionalBlockStateType,
Types1_20_3.ENTITY_DATA_TYPES.particleType,
null);
null
);
registerBlockStateHandler(EntityTypes1_20_3.ABSTRACT_MINECART, 11);
}
@ -147,4 +146,4 @@ public final class EntityPacketRewriter1_20_3 extends EntityRewriter<Clientbound
public EntityType typeFromId(final int type) {
return EntityTypes1_20_3.getTypeFromId(type);
}
}
}

View File

@ -504,10 +504,6 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
return;
}
if (dataIndex > 9) {
event.setIndex(dataIndex - 1);
}
if (dataIndex == 11) {
// If the particle is found first
final EntityData colorData = event.dataAtIndex(9);
@ -515,6 +511,10 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
addColor(data, colorData.value());
}
}
if (dataIndex > 9) {
event.setIndex(dataIndex - 1);
}
});
filter().type(EntityTypes1_20_5.ARROW).index(10).handler((event, data) -> {