Examples of TileEntityElevatorCaller


Examples of pneumaticCraft.common.tileentity.TileEntityElevatorCaller

public class RenderElevatorCaller extends TileEntitySpecialRenderer{

    @Override
    public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f){
        TileEntityElevatorCaller tile = (TileEntityElevatorCaller)tileentity;
        Tessellator tess = Tessellator.instance;
        GL11.glPushMatrix();
        GL11.glTranslated(x + 0.5, y + 1.5, z + 0.5);
        GL11.glScalef(1.0F, -1F, -1F);
        // GL11.glRotated(180, 0, 0, 1);
        PneumaticCraftUtils.rotateMatrixByMetadata(tileentity.getBlockMetadata());
        GL11.glTranslatef(-1, 0, -1);

        for(TileEntityElevatorCaller.ElevatorButton button : tile.getFloors()) {
            GL11.glDisable(GL11.GL_TEXTURE_2D);
            GL11.glDisable(GL11.GL_LIGHTING);
            tess.startDrawingQuads();
            tess.setColorRGBA_F(button.red, button.green, button.blue, 1F);
            tess.addVertex(button.posX + 0.5D, button.posY + 0.5D, 0.499D);
View Full Code Here

Examples of pneumaticCraft.common.tileentity.TileEntityElevatorCaller

        MovingObjectPosition rayTrace = super.collisionRayTrace(world, x, y, z, origin, direction);
        ForgeDirection orientation = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z) & 7).getOpposite();
        if(rayTrace != null && rayTrace.sideHit == orientation.ordinal()) {
            TileEntity te = world.getTileEntity(x, y, z);
            if(te instanceof TileEntityElevatorCaller) {
                TileEntityElevatorCaller caller = (TileEntityElevatorCaller)te;
                for(TileEntityElevatorCaller.ElevatorButton button : caller.getFloors()) {
                    float startX = 0, startZ = 0, endX = 0, endZ = 0;
                    switch(orientation){
                        case NORTH:
                            startZ = 0F;
                            endZ = 0.01F;
View Full Code Here

Examples of pneumaticCraft.common.tileentity.TileEntityElevatorCaller

    @Override
    public int isProvidingWeakPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5){

        TileEntity te = par1IBlockAccess.getTileEntity(par2, par3, par4);
        if(te instanceof TileEntityElevatorCaller) {
            TileEntityElevatorCaller teEc = (TileEntityElevatorCaller)te;
            return teEc.getEmittingRedstone() ? 15 : 0;
        }

        return 0;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.