mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-05 04:49:10 +01:00
40 lines
1.1 KiB
Java
40 lines
1.1 KiB
Java
|
package de.ellpeck.naturesaura.blocks;
|
||
|
|
||
|
import net.minecraft.block.SoundType;
|
||
|
import net.minecraft.block.material.Material;
|
||
|
import net.minecraft.block.state.IBlockState;
|
||
|
import net.minecraft.util.BlockRenderLayer;
|
||
|
import net.minecraft.util.math.BlockPos;
|
||
|
import net.minecraft.world.World;
|
||
|
import net.minecraftforge.fml.relauncher.Side;
|
||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||
|
|
||
|
import java.util.Random;
|
||
|
|
||
|
public class BlockDecayedLeaves extends BlockImpl {
|
||
|
|
||
|
public BlockDecayedLeaves() {
|
||
|
super("decayed_leaves", Material.LEAVES);
|
||
|
this.setTickRandomly(true);
|
||
|
this.setHardness(0.2F);
|
||
|
this.setLightOpacity(1);
|
||
|
this.setSoundType(SoundType.PLANT);
|
||
|
}
|
||
|
|
||
|
public boolean isOpaqueCube(IBlockState state) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@SideOnly(Side.CLIENT)
|
||
|
public BlockRenderLayer getRenderLayer() {
|
||
|
return BlockRenderLayer.CUTOUT_MIPPED;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random random) {
|
||
|
if (!worldIn.isRemote) {
|
||
|
worldIn.setBlockToAir(pos);
|
||
|
}
|
||
|
}
|
||
|
}
|