use of pneumaticCraft.common.tileentity.TileEntityUVLightBox in project PneumaticCraft by MineMaarten.
the class ModelUVLightBox method renderStatic.
@Override
public void renderStatic(float size, TileEntity te) {
if (te instanceof TileEntityUVLightBox) {
TileEntityUVLightBox tile = (TileEntityUVLightBox) te;
renderModel(size, tile.leftConnected, tile.rightConnected, tile.areLightsOn);
if (blueprintEntity == null) {
blueprintEntity = new EntityItem(tile.getWorldObj());
blueprintEntity.setEntityItemStack(new ItemStack(Itemss.PCBBlueprint));
blueprintEntity.hoverStart = 0.0F;
}
if (pcbEntity == null) {
pcbEntity = new EntityItem(tile.getWorldObj());
pcbEntity.setEntityItemStack(new ItemStack(Itemss.emptyPCB));
pcbEntity.hoverStart = 0.0F;
}
// getGhostItemScaleFactor(tileGlassBell.getStackInSlot(TileGlassBell.DISPLAY_SLOT_INVENTORY_INDEX));
float scaleFactor = 1.0F;
// float rotationAngle = (float) (720.0 *
// (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);
// GL11.glTranslatef(10F / 16F, (float)d1 + 2.0F / 16F, (float)d2 + 0.5F); // size
// size
GL11.glTranslatef(0, 22.0F / 16F, 2F / 16F);
// translateGhostItemByOrientation(ghostEntityItem.getEntityItem(),
// x, y, z, tileGlassBell.getOrientation());
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
// GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F);
GL11.glRotated(-90, 1, 0, 0);
//GL11.glRotated(90, 0, 0, 1);
boolean fancySetting = RenderManager.instance.options.fancyGraphics;
RenderManager.instance.options.fancyGraphics = true;
customRenderItem.doRender(blueprintEntity, 0, 0, 0, 0, 0);
if (tile.inventory[TileEntityUVLightBox.PCB_INDEX] != null && tile.inventory[TileEntityUVLightBox.PCB_INDEX].getItem() == Itemss.emptyPCB) {
GL11.glTranslated(0, 0, 0.5 / 16D);
customRenderItem.doRender(pcbEntity, 0, 0, 0, 0, 0);
}
RenderManager.instance.options.fancyGraphics = fancySetting;
} else {
renderModel(size, false, false, false);
}
}
use of pneumaticCraft.common.tileentity.TileEntityUVLightBox in project PneumaticCraft by MineMaarten.
the class BlockUVLightBox method getLightValue.
@Override
public int getLightValue(IBlockAccess world, int x, int y, int z) {
Block block = world.getBlock(x, y, z);
if (block != null && block != this) {
return block.getLightValue(world, x, y, z);
}
TileEntity te = world.getTileEntity(x, y, z);
if (te != null && te instanceof TileEntityUVLightBox) {
return ((TileEntityUVLightBox) te).getLightLevel();
} else {
return 0;
}
}
Aggregations