mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed zap apples not growing and fixed wolf howl not howling
This commit is contained in:
parent
09e8f8243c
commit
9314e144e0
2 changed files with 8 additions and 4 deletions
|
@ -40,6 +40,11 @@ public class ZapAppleLeavesBlock extends LeavesBlock implements TintedBlock {
|
|||
builder.add(STAGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasRandomTicks(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
||||
super.randomTick(state, world, pos, random);
|
||||
|
@ -96,11 +101,9 @@ public class ZapAppleLeavesBlock extends LeavesBlock implements TintedBlock {
|
|||
}
|
||||
|
||||
if (stage == ZapAppleStageStore.Stage.RIPE) {
|
||||
store.playMoonEffect(pos);
|
||||
|
||||
if (below.isOf(UBlocks.ZAP_BULB)) {
|
||||
world.setBlockState(pos.down(), UBlocks.ZAP_APPLE.getDefaultState(), Block.NOTIFY_ALL);
|
||||
store.triggerLightningStrike(pos);
|
||||
store.playMoonEffect(pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,8 @@ public class ZapAppleStageStore extends PersistentState implements Tickable {
|
|||
if (!playedMoonEffect) {
|
||||
playedMoonEffect = true;
|
||||
markDirty();
|
||||
world.playSound(pos.getX(), pos.getY(), pos.getZ(), SoundEvents.ENTITY_WOLF_HOWL, SoundCategory.BLOCKS, 1.5F, 0.9F, true);
|
||||
|
||||
world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), SoundEvents.ENTITY_WOLF_HOWL, SoundCategory.BLOCKS, 1.5F, 0.3F, world.random.nextInt(1200));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue