Remove old particles type handling code

This commit is contained in:
Nassim Jahnke 2024-06-18 18:42:39 +02:00
parent a921337178
commit 13a74f43ef
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F

View File

@ -419,18 +419,6 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
);
registerBlockStateHandler(EntityTypes1_20_5.ABSTRACT_MINECART, 11);
filter().type(EntityTypes1_20_5.LIVING_ENTITY).index(10).handler((event, meta) -> {
final Particle[] particles = meta.value();
int color = 0;
for (final Particle particle : particles) {
if (particle.id() == protocol.getMappingData().getParticleMappings().id("entity_effect")) {
// Remove color argument, use one of them for the ambient particle color
color = particle.<Integer>removeArgument(0).getValue();
}
}
meta.setTypeAndValue(Types1_20_3.ENTITY_DATA_TYPES.varIntType, removeAlpha(color));
});
filter().type(EntityTypes1_20_5.AREA_EFFECT_CLOUD).addIndex(9); // Color
filter().type(EntityTypes1_20_5.AREA_EFFECT_CLOUD).index(11).handler((event, meta) -> {
final Particle particle = meta.value();