Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 16:40:10 +01:00
Ursprung
a8d7ab62e3
Commit
cb5fc9fb08
@ -387,7 +387,7 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int withAlpha(final int rgb) {
|
private int withAlpha(final int rgb) {
|
||||||
return 255 << 24 | rgb & 16777215;
|
return 255 << 24 | rgb & 0xffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -426,6 +426,12 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
|||||||
|
|
||||||
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();
|
||||||
|
if (effectColor == 0) {
|
||||||
|
// No effect
|
||||||
|
meta.setTypeAndValue(Types1_20_5.META_TYPES.particlesType, new Particle[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final Particle particle = new Particle(protocol.getMappingData().getParticleMappings().mappedId("entity_effect"));
|
final Particle particle = new Particle(protocol.getMappingData().getParticleMappings().mappedId("entity_effect"));
|
||||||
particle.add(Type.INT, withAlpha(effectColor));
|
particle.add(Type.INT, withAlpha(effectColor));
|
||||||
meta.setTypeAndValue(Types1_20_5.META_TYPES.particlesType, new Particle[]{particle});
|
meta.setTypeAndValue(Types1_20_5.META_TYPES.particlesType, new Particle[]{particle});
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren