fixed ancient leaves not decaying

Closes #117
This commit is contained in:
Ellpeck 2020-05-12 17:35:32 +02:00
parent 7f4d6da0a6
commit 82d72d8b57

View file

@ -79,8 +79,8 @@ public class BlockAncientLeaves extends LeavesBlock implements IModItem, IColorP
}
@Override
public void tick(BlockState state, ServerWorld worldIn, BlockPos pos, Random random) {
super.tick(state, worldIn, pos, random);
public void randomTick(BlockState state, ServerWorld worldIn, BlockPos pos, Random random) {
super.randomTick(state, worldIn, pos, random);
if (!worldIn.isRemote) {
TileEntity tile = worldIn.getTileEntity(pos);
if (tile instanceof TileEntityAncientLeaves) {
@ -91,6 +91,11 @@ public class BlockAncientLeaves extends LeavesBlock implements IModItem, IColorP
}
}
@Override
public boolean ticksRandomly(BlockState state) {
return true;
}
@Override
public void generateCustomBlockState(BlockStateGenerator generator) {
generator.simpleBlock(this, generator.models().getExistingFile(generator.modLoc(this.getBaseName())));