mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 10:05:12 +01:00
Add missing dust_color_transition data remapping (changed in 24w03a)
This commit is contained in:
parent
1bb85b11e9
commit
e08c263ced
@ -80,7 +80,7 @@ public class ParticleType extends DynamicType<Particle> {
|
|||||||
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Red 0-1
|
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Red 0-1
|
||||||
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Green 0-1
|
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Green 0-1
|
||||||
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Blue 0-1
|
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Blue 0-1
|
||||||
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Scale 0.01-4
|
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Scale 0.01-4 (moved to the end as of 24w03a / 1.20.5)
|
||||||
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Red
|
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Red
|
||||||
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Green
|
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Green
|
||||||
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Blue
|
particle.add(Type.FLOAT, Type.FLOAT.readPrimitive(buf)); // Blue
|
||||||
|
@ -214,6 +214,13 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter<Clientboun
|
|||||||
if (particle.id() == protocol.getMappingData().getParticleMappings().mappedId("entity_effect")) {
|
if (particle.id() == protocol.getMappingData().getParticleMappings().mappedId("entity_effect")) {
|
||||||
particle.add(Type.INT, data != 0 ? ThreadLocalRandom.current().nextInt() : 0); // rgb
|
particle.add(Type.INT, data != 0 ? ThreadLocalRandom.current().nextInt() : 0); // rgb
|
||||||
}
|
}
|
||||||
|
if (particle.id() == protocol.getMappingData().getParticleMappings().mappedId("dust_color_transition")) {
|
||||||
|
for (int i = 0; i < 7; i++) {
|
||||||
|
particle.add(Type.FLOAT, wrapper.read(Type.FLOAT));
|
||||||
|
}
|
||||||
|
// fromColor, scale, toColor -> fromColor, toColor, scale
|
||||||
|
particle.add(Type.FLOAT, particle.<Float> removeArgument(3).getValue());
|
||||||
|
}
|
||||||
|
|
||||||
if (mappings.isBlockParticle(particleId)) {
|
if (mappings.isBlockParticle(particleId)) {
|
||||||
final int blockStateId = wrapper.read(Type.VAR_INT);
|
final int blockStateId = wrapper.read(Type.VAR_INT);
|
||||||
@ -223,6 +230,8 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter<Clientboun
|
|||||||
particle.add(Types1_20_5.ITEM, item);
|
particle.add(Types1_20_5.ITEM, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: We should read the particle data of every particle.
|
||||||
|
// Otherwise reading the particle type in future versions will be broken.
|
||||||
wrapper.write(Types1_20_5.PARTICLE, particle);
|
wrapper.write(Types1_20_5.PARTICLE, particle);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user