3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 00:22:51 +01:00

Use correct item type for 1.20.5 particle reading

Dieser Commit ist enthalten in:
Gero 2024-04-20 23:50:24 +02:00
Ursprung 3055a4277d
Commit 0acaed7c7a
2 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -28,6 +28,7 @@ import com.viaversion.viaversion.api.minecraft.Particle;
import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.minecraft.item.Item;
import com.viaversion.viaversion.api.protocol.Protocol; import com.viaversion.viaversion.api.protocol.Protocol;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.types.version.Types1_20_5;
import com.viaversion.viaversion.util.Key; import com.viaversion.viaversion.util.Key;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
@ -70,6 +71,7 @@ public class ParticleType extends DynamicType<Particle> {
public static final DataReader<Particle> ITEM1_13 = itemHandler(Type.ITEM1_13); public static final DataReader<Particle> ITEM1_13 = itemHandler(Type.ITEM1_13);
public static final DataReader<Particle> ITEM1_13_2 = itemHandler(Type.ITEM1_13_2); public static final DataReader<Particle> ITEM1_13_2 = itemHandler(Type.ITEM1_13_2);
public static final DataReader<Particle> ITEM1_20_2 = itemHandler(Type.ITEM1_20_2); public static final DataReader<Particle> ITEM1_20_2 = itemHandler(Type.ITEM1_20_2);
public static final DataReader<Particle> ITEM1_20_5 = itemHandler(Types1_20_5.ITEM);
public static final DataReader<Particle> DUST = (buf, particle) -> { public static final DataReader<Particle> DUST = (buf, 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

Datei anzeigen

@ -252,7 +252,7 @@ public final class Protocol1_20_5To1_20_3 extends AbstractProtocol<ClientboundPa
.reader("dust_pillar", ParticleType.Readers.BLOCK) .reader("dust_pillar", ParticleType.Readers.BLOCK)
.reader("falling_dust", ParticleType.Readers.BLOCK) .reader("falling_dust", ParticleType.Readers.BLOCK)
.reader("dust_color_transition", ParticleType.Readers.DUST_TRANSITION) .reader("dust_color_transition", ParticleType.Readers.DUST_TRANSITION)
.reader("item", ParticleType.Readers.ITEM1_20_2) .reader("item", ParticleType.Readers.ITEM1_20_5)
.reader("vibration", ParticleType.Readers.VIBRATION1_20_3) .reader("vibration", ParticleType.Readers.VIBRATION1_20_3)
.reader("sculk_charge", ParticleType.Readers.SCULK_CHARGE) .reader("sculk_charge", ParticleType.Readers.SCULK_CHARGE)
.reader("shriek", ParticleType.Readers.SHRIEK) .reader("shriek", ParticleType.Readers.SHRIEK)