Skip to content

Commit 45d90ec

Browse files
author
m2en
committed
fix: 完全に成長しているのに農作物破壊できない問題の修正
1 parent 437f1b0 commit 45d90ec

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/net/azisaba/afnw/afnwcore2/listeners/block/CropsBreakCanceller.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,10 @@ public void onBreakNewAgeCrops(BlockBreakEvent e) {
5959
return;
6060
}
6161

62-
if (!(b.getBlockData() instanceof Ageable)) {
63-
Ageable crop = (Ageable) b.getBlockData();
64-
if (crop.getMaximumAge() == crop.getAge()) {
65-
return;
66-
}
62+
if (b.getBlockData() instanceof Ageable crop) {
63+
if (crop.getMaximumAge() == crop.getAge()) {
64+
return;
65+
}
6766
}
6867

6968
e.setCancelled(true);

0 commit comments

Comments
 (0)