mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-29 05:26:23 +01:00
Fix tipped arrow and area effect cloud color
This commit is contained in:
parent
cb5fc9fb08
commit
31211c2214
@ -444,7 +444,14 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
|||||||
if (metaIndex == 9) {
|
if (metaIndex == 9) {
|
||||||
// If the color is found first
|
// If the color is found first
|
||||||
final Metadata particleData = event.metaAtIndex(11);
|
final Metadata particleData = event.metaAtIndex(11);
|
||||||
addColor(particleData, meta.value());
|
if (particleData == null) {
|
||||||
|
// Add default particle with data
|
||||||
|
final Particle particle = new Particle(protocol.getMappingData().getParticleMappings().mappedId("entity_effect"));
|
||||||
|
particle.add(Type.INT, withAlpha(meta.value()));
|
||||||
|
event.createExtraMeta(new Metadata(10, Types1_20_5.META_TYPES.particleType, particle));
|
||||||
|
} else {
|
||||||
|
addColor(particleData, meta.value());
|
||||||
|
}
|
||||||
|
|
||||||
event.cancel();
|
event.cancel();
|
||||||
return;
|
return;
|
||||||
@ -463,6 +470,13 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
filter().type(EntityTypes1_20_5.ARROW).index(10).handler((event, meta) -> {
|
||||||
|
final int color = meta.value();
|
||||||
|
if (color != -1) {
|
||||||
|
meta.setValue(withAlpha(color));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
filter().type(EntityTypes1_20_5.MINECART_ABSTRACT).index(11).handler((event, meta) -> {
|
filter().type(EntityTypes1_20_5.MINECART_ABSTRACT).index(11).handler((event, meta) -> {
|
||||||
final int blockState = meta.value();
|
final int blockState = meta.value();
|
||||||
meta.setValue(protocol.getMappingData().getNewBlockStateId(blockState));
|
meta.setValue(protocol.getMappingData().getNewBlockStateId(blockState));
|
||||||
|
Loading…
Reference in New Issue
Block a user