wasliebob

Untitled

Apr 29th, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. package fmpintegration.main.init;
  2.  
  3. import ic2.core.block.wiring.TileEntityCable;
  4. import net.minecraft.block.Block;
  5. import net.minecraft.client.Minecraft;
  6. import net.minecraft.tileentity.TileEntity;
  7. import net.minecraft.world.World;
  8. import codechicken.lib.vec.Cuboid6;
  9. import codechicken.multipart.minecraft.McSidedMetaPart;
  10. import cpw.mods.fml.common.registry.GameData;
  11.  
  12. public class IC2CablePart extends McSidedMetaPart{
  13.  
  14. public IC2CablePart(int meta)
  15. {
  16. super(0);
  17. }
  18.  
  19. // public IC2CablePart(int meta)
  20. // {
  21. // super(0);
  22. // }
  23.  
  24. @Override
  25. public void onAdded(){
  26. Minecraft mc = Minecraft.getMinecraft();
  27. World world = mc.theWorld;
  28.  
  29. world.addTileEntity(new TileEntityCable());
  30. }
  31.  
  32. @Override
  33. public TileEntity getTile()
  34. {
  35. return new TileEntityCable();
  36. }
  37.  
  38. @Override
  39. public Cuboid6 getBounds() {
  40. Block b = GameData.getBlockRegistry().getRaw("IC2:blockCable");
  41. // return new Cuboid6(b.getBlockBoundsMinX(), b.getBlockBoundsMinY(), b.getBlockBoundsMinZ(), b.getBlockBoundsMaxX(), b.getBlockBoundsMaxY(), b.getBlockBoundsMaxZ());
  42.  
  43. return new Cuboid6(0.2, 0.2, 0.2, 0.8, 0.8, 0.8);
  44. }
  45.  
  46. @Override
  47. public boolean doesTick() {
  48. return true;
  49. }
  50.  
  51. @Override
  52. public Block getBlock() {
  53. return GameData.getBlockRegistry().getRaw("IC2:blockCable");
  54. }
  55.  
  56. @Override
  57. public String getType() {
  58. return getBlock().getUnlocalizedName();
  59. }
  60.  
  61. @Override
  62. public int sideForMeta(int side) {
  63. return side;
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment