From 7868db90b57dd49066f02cefe486457e0feb9073 Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 4 Aug 2023 18:28:35 +0100 Subject: [PATCH] Fixed zap apple trees not progressing --- .../unicopia/block/ZapAppleLeavesPlaceholderBlock.java | 5 +++-- .../unicopia/server/world/ZapAppleStageStore.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/block/ZapAppleLeavesPlaceholderBlock.java b/src/main/java/com/minelittlepony/unicopia/block/ZapAppleLeavesPlaceholderBlock.java index 124ab202..eb2f1526 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/ZapAppleLeavesPlaceholderBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/ZapAppleLeavesPlaceholderBlock.java @@ -26,10 +26,11 @@ public class ZapAppleLeavesPlaceholderBlock extends AirBlock { ZapAppleStageStore store = ZapAppleStageStore.get(world); ZapAppleStageStore.Stage newStage = store.getStage(); if (!world.isDay() && ZapAppleStageStore.Stage.HIBERNATING.mustChangeIntoInstantly(newStage)) { - world.setBlockState(pos, newStage.getNewState(state)); + state = newStage.getNewState(state); + world.setBlockState(pos, state); BaseZapAppleLeavesBlock.onStageChanged(store, newStage, world, state, pos, random); } - world.scheduleBlockTick(pos, this, 1); + world.scheduleBlockTick(pos, state.getBlock(), 1); } } diff --git a/src/main/java/com/minelittlepony/unicopia/server/world/ZapAppleStageStore.java b/src/main/java/com/minelittlepony/unicopia/server/world/ZapAppleStageStore.java index 1565a4ab..547a8c31 100644 --- a/src/main/java/com/minelittlepony/unicopia/server/world/ZapAppleStageStore.java +++ b/src/main/java/com/minelittlepony/unicopia/server/world/ZapAppleStageStore.java @@ -171,7 +171,7 @@ public class ZapAppleStageStore extends PersistentState implements Tickable { if (this == ZapAppleStageStore.Stage.FLOWERING) { return UBlocks.FLOWERING_ZAP_LEAVES.getDefaultState(); } - return currentState.withIfExists(ZapAppleLeavesBlock.STAGE, this); + return UBlocks.FLOWERING_ZAP_LEAVES.getDefaultState().withIfExists(ZapAppleLeavesBlock.STAGE, this); } @Override