Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-27 00:22:53 +01:00
Remove alpha channel from particle colors in 1.20.5->.3 (#737)
Dieser Commit ist enthalten in:
Ursprung
34101ea8b8
Commit
633b4b393b
@ -317,6 +317,10 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
|||||||
return (int) Math.floor(part * 255);
|
return (int) Math.floor(part * 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int removeAlpha(final int argb) {
|
||||||
|
return argb & 0x00FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
private void moveTag(final CompoundTag compoundTag, final String from, final String to) {
|
private void moveTag(final CompoundTag compoundTag, final String from, final String to) {
|
||||||
final Tag tag = compoundTag.remove(from);
|
final Tag tag = compoundTag.remove(from);
|
||||||
if (tag != null) {
|
if (tag != null) {
|
||||||
@ -374,7 +378,7 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
|||||||
color = particle.<Integer>removeArgument(0).getValue();
|
color = particle.<Integer>removeArgument(0).getValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
meta.setTypeAndValue(Types1_20_3.META_TYPES.varIntType, color);
|
meta.setTypeAndValue(Types1_20_3.META_TYPES.varIntType, removeAlpha(color));
|
||||||
});
|
});
|
||||||
|
|
||||||
filter().type(EntityTypes1_20_5.AREA_EFFECT_CLOUD).addIndex(9); // Color
|
filter().type(EntityTypes1_20_5.AREA_EFFECT_CLOUD).addIndex(9); // Color
|
||||||
@ -383,7 +387,7 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
|||||||
if (particle.id() == protocol.getMappingData().getParticleMappings().mappedId("entity_effect")) {
|
if (particle.id() == protocol.getMappingData().getParticleMappings().mappedId("entity_effect")) {
|
||||||
// Move color to its own metadata
|
// Move color to its own metadata
|
||||||
final int color = particle.<Integer>removeArgument(0).getValue();
|
final int color = particle.<Integer>removeArgument(0).getValue();
|
||||||
event.createExtraMeta(new Metadata(9, Types1_20_3.META_TYPES.varIntType, color));
|
event.createExtraMeta(new Metadata(9, Types1_20_3.META_TYPES.varIntType, removeAlpha(color)));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
projectVersion=4.10.1
|
projectVersion=4.10.2-SNAPSHOT
|
||||||
|
|
||||||
# Smile emoji
|
# Smile emoji
|
||||||
mcVersions=1.20.6,1.20.5,1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10
|
mcVersions=1.20.6,1.20.5,1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren