9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-27 02:49:11 +00:00

Fixed dead crop not removed

This commit is contained in:
XiaoMoMi
2024-09-03 01:46:24 +08:00
parent 67bbeb5773
commit 3a2b8c9e1f

View File

@@ -163,6 +163,9 @@ public class PotBlock extends AbstractCustomCropsBlock {
world.removeBlockState(pos3.add(0,1,0));
BukkitCustomCropsPlugin.getInstance().getItemManager().remove(upperLocation, ExistenceForm.ANY);
}
if (cropConfig == null && Registries.ITEM_TO_DEAD_CROP.containsKey(upperID)) {
BukkitCustomCropsPlugin.getInstance().getItemManager().remove(upperLocation, ExistenceForm.ANY);
}
context.arg(ContextKeys.LOCATION, location);
ActionManager.trigger(context, config.breakActions());