Commit 7783e9a
Fix ItemStack conversion on block place on MC 1.21 (#2093)
* Fix ItemStack conversion on block place
This issue is present in 1.21 because some materials do not convert 1:1 to item types.
This throws an exception in the ItemStack constructor.
Example: WALL_TORCH is a valid block but not a valid item, only TORCH is a valid item.
So, use the item in hand instead, creating a copy with quantity set to 1, for issueing the
use item event.
* Use ItemStack as-is.
Closes #2092.
---------
Co-authored-by: wizjany <wizjany@gmail.com>1 parent 2bd426b commit 7783e9a
File tree
1 file changed
+2
-2
lines changed- worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener
1 file changed
+2
-2
lines changedworldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
222 | | - | |
| 221 | + | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
0 commit comments