Package pneumaticCraft.api.item

Examples of pneumaticCraft.api.item.IPressurizable


        } else if(!(te.getStackInSlot(TileEntityChargingStation.CHARGE_INVENTORY_INDEX).getItem() instanceof IPressurizable)) {
            textList.addAll(PneumaticCraftUtils.convertStringIntoList("\u00a77The put in item can't be (dis)charged", GuiConstants.maxCharPerLineLeft));
            textList.addAll(PneumaticCraftUtils.convertStringIntoList("\u00a70Put a pneumatic item in the charge slot.", GuiConstants.maxCharPerLineLeft));
        } else {
            ItemStack chargeStack = te.getStackInSlot(TileEntityChargingStation.CHARGE_INVENTORY_INDEX);
            IPressurizable chargeItem = (IPressurizable)chargeStack.getItem();
            if(chargeItem.getPressure(chargeStack) > te.getPressure(ForgeDirection.UNKNOWN) + 0.01F && chargeItem.getPressure(chargeStack) <= 0) {
                textList.addAll(PneumaticCraftUtils.convertStringIntoList("\u00a77The put in item can't be discharged", GuiConstants.maxCharPerLineLeft));
                textList.add("\u00a70The item is empty.");
            } else if(chargeItem.getPressure(chargeStack) < te.getPressure(ForgeDirection.UNKNOWN) - 0.01F && chargeItem.getPressure(chargeStack) >= chargeItem.maxPressure(chargeStack)) {
                textList.addAll(PneumaticCraftUtils.convertStringIntoList("\u00a77The put in item can't be charged", GuiConstants.maxCharPerLineLeft));
                textList.add("\u00a70The item is full.");
            } else if(!te.charging && !te.disCharging) {
                textList.addAll(PneumaticCraftUtils.convertStringIntoList("\u00a77The put in item can't be (dis)charged", GuiConstants.maxCharPerLineLeft));
                textList.add("\u00a70The pressures have equalized.");
View Full Code Here


            }
        }
        int speedMultiplier = (int)getSpeedMultiplierFromUpgrades(getUpgradeSlots());
        for(int i = 0; i < PneumaticValues.CHARGING_STATION_CHARGE_RATE * speedMultiplier; i++) {
            for(int j = 0; j < chargingItems.size(); j++) {
                IPressurizable chargingItem = chargingItems.get(j);
                ItemStack chargedItem = chargedStacks.get(j);
                if(chargingItem.getPressure(chargedItem) > getPressure(ForgeDirection.UNKNOWN) + 0.01F && chargingItem.getPressure(chargedItem) > 0F) {
                    chargingItem.addAir(chargedItem, -1);
                    addAir(1, ForgeDirection.UNKNOWN);
                    disCharging = true;
                    renderAirProgress -= ANIMATION_AIR_SPEED;
                    if(renderAirProgress < 0.0F) {
                        renderAirProgress += 1F;
                    }
                } else if(chargingItem.getPressure(chargedItem) < getPressure(ForgeDirection.UNKNOWN) - 0.01F && chargingItem.getPressure(chargedItem) < chargingItem.maxPressure(chargedItem)) {// if there is pressure, and the item isn't fully charged yet..
                    chargingItem.addAir(chargedItem, 1);
                    addAir(-1, ForgeDirection.UNKNOWN);
                    charging = true;
                    renderAirProgress += ANIMATION_AIR_SPEED;
                    if(renderAirProgress > 1.0F) {
                        renderAirProgress -= 1F;
View Full Code Here

TOP

Related Classes of pneumaticCraft.api.item.IPressurizable

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.