Created
February 16, 2016 19:48
-
-
Save izzyaxel/3c2d65fa0c30544e28ab to your computer and use it in GitHub Desktop.
The Block for the 'black hole' type of block
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BlockBlackHole extends BlockContainer | |
{ | |
public BlockBlackHole() | |
{ | |
super(Material.glass); | |
this.setBlockName("blackHole"); | |
this.setHardness(1.0F); | |
this.setResistance(1.0F); | |
this.setBlockTextureName(YourModID + ":" + getUnlocalizedName().substring(5)); | |
this.setHarvestLevel("pickaxe", 1); | |
} | |
//Create a tile entity for this block to do all the logic in | |
@Override | |
public TileEntity createNewTileEntity(World world, int id) | |
{ | |
return new TEBlackHole(); | |
} | |
//Make the block intangible by not adding anything to the list | |
@Override | |
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB aabb, List list, Entity entity){} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment