3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-10-05 01:41:05 +02:00

Handle block state particles when identifier is used in 1.20.5->.3 (#764)

Dieser Commit ist enthalten in:
EnZaXD 2024-05-30 10:45:02 +02:00 committet von GitHub
Ursprung 3511ba3c67
Commit b53c0aeb9b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -283,8 +283,13 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
private void updateParticleFormat(final CompoundTag options, final String particleType) {
if ("block".equals(particleType) || "block_marker".equals(particleType) || "falling_dust".equals(particleType) || "dust_pillar".equals(particleType)) {
// TODO Can be a string
moveTag(options, "block_state", "value");
Tag blockState = options.remove("block_state");
if (blockState instanceof StringTag) {
final CompoundTag compoundTag = new CompoundTag();
compoundTag.put("Name", blockState);
blockState = compoundTag;
}
options.put("value", blockState);
} else if ("item".equals(particleType)) {
Tag item = options.remove("item");
if (item instanceof StringTag) {