Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 00:22:51 +01:00
Fix tipped arrow and area effect cloud color
Dieser Commit ist enthalten in:
Ursprung
cb5fc9fb08
Commit
31211c2214
@ -444,7 +444,14 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
||||
if (metaIndex == 9) {
|
||||
// If the color is found first
|
||||
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();
|
||||
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) -> {
|
||||
final int blockState = meta.value();
|
||||
meta.setValue(protocol.getMappingData().getNewBlockStateId(blockState));
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren