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

Fixed grow actions

This commit is contained in:
XiaoMoMi
2024-12-04 16:34:04 +08:00
parent 69513cb878
commit c96690dfaa
2 changed files with 12 additions and 2 deletions

View File

@@ -400,7 +400,15 @@ public class CropBlock extends AbstractCustomCropsBlock {
CropStageConfig nextStage = config.stageWithModelByPoint(afterPoints);
plugin.getScheduler().sync().run(() -> {
if (currentStage == nextStage) return;
if (currentStage == nextStage) {
for (int i = previousPoint + 1; i <= afterPoints; i++) {
CropStageConfig stage = config.stageByPoint(i);
if (stage != null) {
ActionManager.trigger(context, stage.growActions());
}
}
return;
}
FurnitureRotation rotation = plugin.getItemManager().remove(bukkitLocation, ExistenceForm.ANY);
if (rotation == FurnitureRotation.NONE && config.rotation()) {
rotation = FurnitureRotation.random();