mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Fixed zap apple trees not progressing
This commit is contained in:
parent
97f56ea4ed
commit
7868db90b5
2 changed files with 4 additions and 3 deletions
|
@ -26,10 +26,11 @@ public class ZapAppleLeavesPlaceholderBlock extends AirBlock {
|
||||||
ZapAppleStageStore store = ZapAppleStageStore.get(world);
|
ZapAppleStageStore store = ZapAppleStageStore.get(world);
|
||||||
ZapAppleStageStore.Stage newStage = store.getStage();
|
ZapAppleStageStore.Stage newStage = store.getStage();
|
||||||
if (!world.isDay() && ZapAppleStageStore.Stage.HIBERNATING.mustChangeIntoInstantly(newStage)) {
|
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);
|
BaseZapAppleLeavesBlock.onStageChanged(store, newStage, world, state, pos, random);
|
||||||
}
|
}
|
||||||
|
|
||||||
world.scheduleBlockTick(pos, this, 1);
|
world.scheduleBlockTick(pos, state.getBlock(), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,7 +171,7 @@ public class ZapAppleStageStore extends PersistentState implements Tickable {
|
||||||
if (this == ZapAppleStageStore.Stage.FLOWERING) {
|
if (this == ZapAppleStageStore.Stage.FLOWERING) {
|
||||||
return UBlocks.FLOWERING_ZAP_LEAVES.getDefaultState();
|
return UBlocks.FLOWERING_ZAP_LEAVES.getDefaultState();
|
||||||
}
|
}
|
||||||
return currentState.withIfExists(ZapAppleLeavesBlock.STAGE, this);
|
return UBlocks.FLOWERING_ZAP_LEAVES.getDefaultState().withIfExists(ZapAppleLeavesBlock.STAGE, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue