Package electricexpansion.common.tile

Examples of electricexpansion.common.tile.TileEntityAdvancedBatteryBox


                    player.addChatMessage("Electric Expansion: " + ElectricityDisplay.getDisplay(((IElectrical) te).getVoltage(), ElectricUnit.VOLTAGE));
                }
               
                if (te instanceof TileEntityAdvancedBatteryBox && ElectricExpansion.debugRecipes)
                {
                    TileEntityAdvancedBatteryBox te2 = (TileEntityAdvancedBatteryBox) te;
                    player.addChatMessage("Electric Expansion: Input;  " + te2.getInputMode());
                    player.addChatMessage("Electric Expansion: Output; " + te2.getOutputMode());
                }
               
                return true;
            }
        }
View Full Code Here


   
    @Override
    @SideOnly(Side.CLIENT)
    public Icon getBlockTexture(IBlockAccess iBlockAccess, int x, int y, int z, int side)
    {
        TileEntityAdvancedBatteryBox te = (TileEntityAdvancedBatteryBox) iBlockAccess.getBlockTileEntity(x, y, z);
        if (te == null)
            return this.icons.get("top");
       
        if (side == te.getOutputDir().ordinal() && te.getOutputMode() != EnumAdvBattBoxMode.OFF && te.getOutputMode() != EnumAdvBattBoxMode.QUANTUM)
            return this.icons.get("out");
        else if (side == te.getInputDir().ordinal() && te.getInputMode() != EnumAdvBattBoxMode.OFF && te.getInputMode() != EnumAdvBattBoxMode.QUANTUM)
            return this.icons.get("input");
       
        if (side == 0 || side == 1)
            return this.icons.get("top");
       
        if (te.getMaxEnergyStored() <= 8_000)
            return this.icons.get("tier1");
        else if (te.getMaxEnergyStored() <= 12_000)
            return this.icons.get("tier2");
        else if (te.getMaxEnergyStored() <= 16_000)
            return this.icons.get("tier3");
        else if (te.getMaxEnergyStored() > 16_000)
            return this.icons.get("tier4");
       
        return this.icons.get("tier1");
    }
View Full Code Here

            if (player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() instanceof ItemLinkCard)
            {
                ItemStack is = player.getCurrentEquippedItem();
                if (((ItemLinkCard) is.getItem()).getHasLinkData(is))
                {
                    TileEntityAdvancedBatteryBox te = (TileEntityAdvancedBatteryBox) world.getBlockTileEntity(x, y, z);
                    if (!te.isLinkCardValid(is))
                    {
                        te.setLinkCard(is);
                        player.inventory.mainInventory[player.inventory.currentItem] = null;
                    }
                }
            }
            else
View Full Code Here

    }
   
    @Override
    public TileEntity createNewTileEntity(World world)
    {
        return new TileEntityAdvancedBatteryBox();
    }
View Full Code Here

    {
        TileEntity tileEntity = par1World.getBlockTileEntity(x, y, z);
       
        if (tileEntity instanceof TileEntityAdvancedBatteryBox)
        {
            TileEntityAdvancedBatteryBox te = (TileEntityAdvancedBatteryBox) tileEntity;
            float max = te.getMaxEnergyStored();
            float current = te.getEnergyStored();
            return (int) (current / max * 15);
        }
       
        return 0;
    }
View Full Code Here

       
        TileEntity tileEntity = par1World.getBlockTileEntity(x, y, z);
       
        if (tileEntity instanceof TileEntityQuantumBatteryBox)
        {
            TileEntityAdvancedBatteryBox te = (TileEntityAdvancedBatteryBox) tileEntity;
            double max = te.getMaxEnergyStored();
            double current = te.getEnergyStored();
            return (int) (current / max * 15);
        }
       
        return 0;
    }
View Full Code Here

TOP

Related Classes of electricexpansion.common.tile.TileEntityAdvancedBatteryBox

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.