Search in sources :

Example 1 with TileEntityProgrammableController

use of pneumaticCraft.common.tileentity.TileEntityProgrammableController in project PneumaticCraft by MineMaarten.

the class RenderProgrammableController method renderTileEntityAt.

/*
     * TileEntitySpecialRenderer part
     */
@Override
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) {
    if (renderDrone == null) {
        renderDrone = new RenderDrone(false);
        renderDrone.setRenderManager(RenderManager.instance);
        drone = new EntityDrone(tileentity.getWorldObj());
    }
    TileEntityProgrammableController te = (TileEntityProgrammableController) tileentity;
    double droneX = te.oldCurX + (te.getPosition().xCoord - te.oldCurX) * f - te.xCoord + 0.5 + d0;
    double droneY = te.oldCurY + (te.getPosition().yCoord - te.oldCurY) * f - te.yCoord - 0.2 + d1;
    double droneZ = te.oldCurZ + (te.getPosition().zCoord - te.oldCurZ) * f - te.zCoord + 0.5 + d2;
    renderDrone.doRender((Entity) drone, droneX, droneY, droneZ, 0, f);
}
Also used : TileEntityProgrammableController(pneumaticCraft.common.tileentity.TileEntityProgrammableController) EntityDrone(pneumaticCraft.common.entity.living.EntityDrone) RenderDrone(pneumaticCraft.client.render.entity.RenderDrone)

Aggregations

RenderDrone (pneumaticCraft.client.render.entity.RenderDrone)1 EntityDrone (pneumaticCraft.common.entity.living.EntityDrone)1 TileEntityProgrammableController (pneumaticCraft.common.tileentity.TileEntityProgrammableController)1