mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-15 11:05:32 +01:00
Handle block state particles when identifier is used in 1.20.5->.3 (#764)
This commit is contained in:
parent
3511ba3c67
commit
b53c0aeb9b
@ -283,8 +283,13 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
|||||||
|
|
||||||
private void updateParticleFormat(final CompoundTag options, final String particleType) {
|
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)) {
|
if ("block".equals(particleType) || "block_marker".equals(particleType) || "falling_dust".equals(particleType) || "dust_pillar".equals(particleType)) {
|
||||||
// TODO Can be a string
|
Tag blockState = options.remove("block_state");
|
||||||
moveTag(options, "block_state", "value");
|
if (blockState instanceof StringTag) {
|
||||||
|
final CompoundTag compoundTag = new CompoundTag();
|
||||||
|
compoundTag.put("Name", blockState);
|
||||||
|
blockState = compoundTag;
|
||||||
|
}
|
||||||
|
options.put("value", blockState);
|
||||||
} else if ("item".equals(particleType)) {
|
} else if ("item".equals(particleType)) {
|
||||||
Tag item = options.remove("item");
|
Tag item = options.remove("item");
|
||||||
if (item instanceof StringTag) {
|
if (item instanceof StringTag) {
|
||||||
|
Loading…
Reference in New Issue
Block a user