Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 09:00:09 +01:00
Actually add properties tag in 1.20.5->1.20.4 item handler
Dieser Commit ist enthalten in:
Ursprung
69b33dc2d2
Commit
3dfc3bb15b
@ -444,13 +444,16 @@ 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);
|
||||||
|
final int color = meta.value();
|
||||||
if (particleData == null) {
|
if (particleData == null) {
|
||||||
// Add default particle with data
|
if (color != 0) {
|
||||||
final Particle particle = new Particle(protocol.getMappingData().getParticleMappings().mappedId("entity_effect"));
|
// Add default particle with data
|
||||||
particle.add(Type.INT, withAlpha(meta.value()));
|
final Particle particle = new Particle(protocol.getMappingData().getParticleMappings().mappedId("entity_effect"));
|
||||||
event.createExtraMeta(new Metadata(10, Types1_20_5.META_TYPES.particleType, particle));
|
particle.add(Type.INT, withAlpha(color));
|
||||||
|
event.createExtraMeta(new Metadata(10, Types1_20_5.META_TYPES.particleType, particle));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
addColor(particleData, meta.value());
|
addColor(particleData, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
event.cancel();
|
event.cancel();
|
||||||
|
@ -264,6 +264,7 @@ public final class StructuredDataConverter {
|
|||||||
values.add(propertyTag);
|
values.add(propertyTag);
|
||||||
propertiesTag.put(property.name(), values);
|
propertiesTag.put(property.name(), values);
|
||||||
}
|
}
|
||||||
|
profileTag.put("Properties", propertiesTag);
|
||||||
});
|
});
|
||||||
register(StructuredDataKey.INSTRUMENT, (data, tag) -> {
|
register(StructuredDataKey.INSTRUMENT, (data, tag) -> {
|
||||||
// Can't do anything with direct values
|
// Can't do anything with direct values
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren