Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fmpintegration.main.init;
- import ic2.core.block.wiring.TileEntityCable;
- import net.minecraft.block.Block;
- import net.minecraft.client.Minecraft;
- import net.minecraft.tileentity.TileEntity;
- import net.minecraft.world.World;
- import codechicken.lib.vec.Cuboid6;
- import codechicken.multipart.minecraft.McSidedMetaPart;
- import cpw.mods.fml.common.registry.GameData;
- public class IC2CablePart extends McSidedMetaPart{
- public IC2CablePart(int meta)
- {
- super(0);
- }
- // public IC2CablePart(int meta)
- // {
- // super(0);
- // }
- @Override
- public void onAdded(){
- Minecraft mc = Minecraft.getMinecraft();
- World world = mc.theWorld;
- world.addTileEntity(new TileEntityCable());
- }
- @Override
- public TileEntity getTile()
- {
- return new TileEntityCable();
- }
- @Override
- public Cuboid6 getBounds() {
- Block b = GameData.getBlockRegistry().getRaw("IC2:blockCable");
- // return new Cuboid6(b.getBlockBoundsMinX(), b.getBlockBoundsMinY(), b.getBlockBoundsMinZ(), b.getBlockBoundsMaxX(), b.getBlockBoundsMaxY(), b.getBlockBoundsMaxZ());
- return new Cuboid6(0.2, 0.2, 0.2, 0.8, 0.8, 0.8);
- }
- @Override
- public boolean doesTick() {
- return true;
- }
- @Override
- public Block getBlock() {
- return GameData.getBlockRegistry().getRaw("IC2:blockCable");
- }
- @Override
- public String getType() {
- return getBlock().getUnlocalizedName();
- }
- @Override
- public int sideForMeta(int side) {
- return side;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment