mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-24 02:44:34 +00:00
58 lines
1.7 KiB
Java
58 lines
1.7 KiB
Java
package com.hbm.blocks.machine.rbmk;
|
|
|
|
import com.hbm.blocks.ModBlocks;
|
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlManual;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.tileentity.TileEntity;
|
|
import net.minecraft.util.AxisAlignedBB;
|
|
import net.minecraft.util.IIcon;
|
|
import net.minecraft.world.World;
|
|
|
|
public class RBMKControl extends RBMKPipedBase {
|
|
|
|
public boolean moderated = false;
|
|
public IIcon textureBottom;
|
|
|
|
public RBMKControl(boolean moderated) {
|
|
super();
|
|
this.moderated = moderated;
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public void registerBlockIcons(IIconRegister reg) {
|
|
super.registerBlockIcons(reg);
|
|
if(this == ModBlocks.rbmk_control_reasim)
|
|
this.textureBottom = reg.registerIcon(this.getTextureName() + "_bottom");
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public IIcon getIcon(int side, int meta) {
|
|
if(this.renderLid == LID_NONE && this == ModBlocks.rbmk_control_reasim && side == 0) return textureBottom;
|
|
return super.getIcon(side, meta);
|
|
}
|
|
|
|
@Override
|
|
public TileEntity createNewTileEntity(World world, int meta) {
|
|
if(meta >= this.offset) return new TileEntityRBMKControlManual();
|
|
if(meta >= this.extra) return new TileEntityProxyCombo();
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
|
return openInv(world, x, y, z, player);
|
|
}
|
|
|
|
@Override
|
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
|
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
|
|
}
|
|
}
|