Skip to content

Commit b53c0ae

Browse files
Handle block state particles when identifier is used in 1.20.5->.3 (#764)
1 parent 3511ba3 commit b53c0ae

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

common/src/main/java/com/viaversion/viabackwards/protocol/v1_20_5to1_20_3/rewriter/EntityPacketRewriter1_20_5.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,13 @@ public void register() {
283283

284284
private void updateParticleFormat(final CompoundTag options, final String particleType) {
285285
if ("block".equals(particleType) || "block_marker".equals(particleType) || "falling_dust".equals(particleType) || "dust_pillar".equals(particleType)) {
286-
// TODO Can be a string
287-
moveTag(options, "block_state", "value");
286+
Tag blockState = options.remove("block_state");
287+
if (blockState instanceof StringTag) {
288+
final CompoundTag compoundTag = new CompoundTag();
289+
compoundTag.put("Name", blockState);
290+
blockState = compoundTag;
291+
}
292+
options.put("value", blockState);
288293
} else if ("item".equals(particleType)) {
289294
Tag item = options.remove("item");
290295
if (item instanceof StringTag) {

0 commit comments

Comments
 (0)