NaturesAura/src/main/java/de/ellpeck/naturesaura/blocks/BlockDecayedLeaves.java

26 lines
778 B
Java
Raw Normal View History

2018-10-14 16:12:33 +02:00
package de.ellpeck.naturesaura.blocks;
2019-11-04 19:08:49 +01:00
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
2018-10-14 16:12:33 +02:00
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.util.math.BlockPos;
2020-01-28 18:08:56 +01:00
import net.minecraft.world.server.ServerWorld;
2018-10-14 16:12:33 +02:00
import java.util.Random;
public class BlockDecayedLeaves extends BlockImpl {
public BlockDecayedLeaves() {
2019-11-04 19:08:49 +01:00
super("decayed_leaves", ModBlocks.prop(Material.LEAVES).hardnessAndResistance(0.2F).sound(SoundType.PLANT).variableOpacity().tickRandomly());
2018-10-14 16:12:33 +02:00
}
2018-10-18 17:12:20 +02:00
@Override
2020-01-28 18:08:56 +01:00
public void tick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
2019-11-04 19:08:49 +01:00
if (!world.isRemote) {
world.setBlockState(pos, Blocks.AIR.getDefaultState());
2018-10-14 16:12:33 +02:00
}
}
2020-01-28 18:08:56 +01:00
2018-10-14 16:12:33 +02:00
}