Fixed IncompatibleClassChangeError when breaking paintings in 1.21.1 and earlier
This commit is contained in:
parent
2780a9af27
commit
9958d372e3
1 changed files with 6 additions and 1 deletions
|
|
@ -72,8 +72,13 @@ public final class HangingBreakListener extends Queue implements Listener {
|
|||
material = Material.PAINTING;
|
||||
Painting painting = (Painting) entity;
|
||||
blockData = "FACING=" + painting.getFacing().name();
|
||||
try {
|
||||
itemData = Util.getArtId(painting.getArt().toString(), true);
|
||||
}
|
||||
catch (IncompatibleClassChangeError e) {
|
||||
// 1.21.2+
|
||||
}
|
||||
}
|
||||
|
||||
if (!event.isCancelled() && Config.getConfig(blockEvent.getWorld()).NATURAL_BREAK) {
|
||||
Queue.queueNaturalBlockBreak(causeName, blockEvent.getState(), attachedBlock, material, blockData, itemData);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue