Package pneumaticCraft.common.tileentity

Examples of pneumaticCraft.common.tileentity.TileEntityChargingStation


    @Override
    public void renderStatic(float size, TileEntity te){
        renderModel(size);
        if(te instanceof TileEntityChargingStation) {
            TileEntityChargingStation tile = (TileEntityChargingStation)te;
            if(tile.getUpgrades(ItemMachineUpgrade.UPGRADE_DISPENSER_DAMAGE) > 0) {
                chargePad.renderModel(size);
            }
            if(tile.getStackInSlot(TileEntityChargingStation.CHARGE_INVENTORY_INDEX) != null) {
                float scaleFactor = 0.7F;

                EntityItem ghostEntityItem = new EntityItem(tile.getWorldObj());
                ghostEntityItem.hoverStart = 0.0F;
                ghostEntityItem.setEntityItemStack(tile.getStackInSlot(TileEntityChargingStation.CHARGE_INVENTORY_INDEX));

                GL11.glTranslated(0, 1, 0);
                GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
                GL11.glScalef(1.0F, -1F, -1F);
View Full Code Here


    public boolean shouldExecute(){
        List<TileEntityChargingStation> validChargingStations = new ArrayList<TileEntityChargingStation>();
        if(drone.getPressure(null) < PneumaticValues.DRONE_LOW_PRESSURE) {
            for(TileEntity te : (List<TileEntity>)drone.worldObj.loadedTileEntityList) {
                if(te.getDistanceFrom(drone.posX, drone.posY, drone.posZ) <= Math.pow(drone.getRange(), 2) && te instanceof TileEntityChargingStation) {
                    TileEntityChargingStation station = (TileEntityChargingStation)te;
                    if(station.getPressure(ForgeDirection.UNKNOWN) > PneumaticValues.DRONE_LOW_PRESSURE && station.getUpgrades(ItemMachineUpgrade.UPGRADE_DISPENSER_DAMAGE) > 0) {
                        validChargingStations.add(station);
                    }
                }
            }
        }
View Full Code Here

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

        TileEntity te = par1IBlockAccess.getTileEntity(par2, par3, par4);
        if(te instanceof TileEntityChargingStation) {
            TileEntityChargingStation teCs = (TileEntityChargingStation)te;
            return teCs.shouldEmitRedstone() ? 15 : 0;
        }

        return 0;
    }
View Full Code Here

TOP

Related Classes of pneumaticCraft.common.tileentity.TileEntityChargingStation

Copyright © 2018 www.massapicom. 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.