mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-21 12:32:12 +00:00
78 lines
1.8 KiB
Java
78 lines
1.8 KiB
Java
package tombenpotter.emt.common.block;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
import net.minecraft.entity.Entity;
|
|
import net.minecraft.entity.EnumCreatureType;
|
|
import net.minecraft.world.Explosion;
|
|
import net.minecraft.world.IBlockAccess;
|
|
import net.minecraft.world.World;
|
|
import tombenpotter.emt.ElectroMagicTools;
|
|
import tombenpotter.emt.ModInformation;
|
|
|
|
import java.util.Random;
|
|
|
|
public class BlockShield extends Block {
|
|
|
|
public BlockShield() {
|
|
super(Material.rock);
|
|
this.setCreativeTab(ElectroMagicTools.tabEMT);
|
|
this.setHardness(1F);
|
|
this.setResistance(10000000000000000000000000000000000000F);
|
|
}
|
|
|
|
@Override
|
|
public int quantityDropped(Random par1Random) {
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public int getRenderBlockPass() {
|
|
return 0;
|
|
}
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
@Override
|
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
|
this.blockIcon = iconRegister.registerIcon(ModInformation.texturePath + ":shield");
|
|
}
|
|
|
|
@Override
|
|
public boolean isOpaqueCube() {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean renderAsNormalBlock() {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
protected boolean canSilkHarvest() {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) {
|
|
}
|
|
}
|