Skip to content

Commit b6f6a7b

Browse files
committed
Fix getting BlockStateMeta prior to 1.20
Affected getting this type of item meta (e.g. shulker boxes and banners) prior to 1.20, and setting this type of meta from 1.18.2 to 1.19.4.
1 parent aebcf13 commit b6f6a7b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBlockStateMeta.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public MCBlockState getBlockState(boolean copy) {
4747
// For example, when getting a shulker box's BlockState on BlockPlaceEvent, it can duplicate the item.
4848
// Copying the meta before getting the block state ensures the original tags are unaffected.
4949
meta = (BlockStateMeta) meta.clone();
50-
} else if(mat == Material.DECORATED_POT
51-
&& Static.getServer().getMinecraftVersion().gte(MCVersion.MC1_20_1)
50+
} else if(Static.getServer().getMinecraftVersion().gte(MCVersion.MC1_20_1)
51+
&& mat == Material.DECORATED_POT
5252
&& Static.getServer().getMinecraftVersion().lte(MCVersion.MC1_20_4)) {
5353
// Workaround upstream bug with decorated pots missing the "id" tag in the BlockEntityTag when broken.
5454
// Without this fix, getting the BlockState from this meta may result in a default decorated pot.

0 commit comments

Comments
 (0)