This commit is contained in:
AlgorithmX2
2014-04-05 15:30:09 -05:00
77 changed files with 1109 additions and 346 deletions
+12 -3
View File
@@ -9,6 +9,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -89,12 +90,20 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
return true;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer p, List l, boolean b)
{
int progress = stack.getItemDamage() % 200;
l.add( Math.floor( (float) progress / 2.0f ) + "%" );
super.addInformation( stack, p, l, b );
}
@Override
public boolean isDamaged(ItemStack stack)
{
if ( stack.getItemDamage() % 200 == 0 )
return false;
return true;
// if ( stack.getItemDamage() % 200 == 0 )
// return false;
return false;
}
@Override
+5 -4
View File
@@ -13,6 +13,8 @@ import appeng.api.AEApi;
import appeng.api.config.FuzzyMode;
import appeng.api.implementations.items.IItemGroup;
import appeng.api.implementations.items.IStorageCell;
import appeng.api.storage.ICellInventory;
import appeng.api.storage.ICellInventoryHandler;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEItemStack;
@@ -23,7 +25,6 @@ import appeng.items.AEBaseItem;
import appeng.items.contents.CellConfig;
import appeng.items.contents.CellUpgrades;
import appeng.items.materials.MaterialType;
import appeng.me.storage.CellInventory;
import appeng.me.storage.CellInventoryHandler;
import appeng.util.InventoryAdaptor;
import appeng.util.Platform;
@@ -68,11 +69,11 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
if ( cdi instanceof CellInventoryHandler )
{
CellInventory cd = ((CellInventoryHandler) cdi).getCellInv();
ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv();
if ( cd != null )
{
l.add( cd.usedBytes() + " " + GuiText.Of.getLocal() + " " + cd.totalBytes() + " " + GuiText.BytesUsed.getLocal() );
l.add( cd.storedItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() );
l.add( cd.getUsedBytes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalBytes() + " " + GuiText.BytesUsed.getLocal() );
l.add( cd.getStoredItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() );
/*
* if ( cd.isPreformatted() ) { String List = StatCollector.translateToLocal( cd.getListMode() ==
* ListMode.WHITELIST ? "AppEng.Gui.Whitelisted" : "AppEng.Gui.Blacklisted" ); if (
+5 -4
View File
@@ -24,6 +24,8 @@ import appeng.api.config.FuzzyMode;
import appeng.api.config.Upgrades;
import appeng.api.implementations.items.IStorageCell;
import appeng.api.networking.security.PlayerSource;
import appeng.api.storage.ICellInventory;
import appeng.api.storage.ICellInventoryHandler;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEItemStack;
@@ -40,7 +42,6 @@ import appeng.hooks.DispenserMatterCannon;
import appeng.items.contents.CellConfig;
import appeng.items.contents.CellUpgrades;
import appeng.items.tools.powered.powersink.AEBasePoweredItem;
import appeng.me.storage.CellInventory;
import appeng.me.storage.CellInventoryHandler;
import appeng.util.Platform;
@@ -69,11 +70,11 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
if ( cdi instanceof CellInventoryHandler )
{
CellInventory cd = ((CellInventoryHandler) cdi).getCellInv();
ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv();
if ( cd != null )
{
lines.add( cd.usedBytes() + " " + GuiText.Of.getLocal() + " " + cd.totalBytes() + " " + GuiText.BytesUsed.getLocal() );
lines.add( cd.storedItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() );
lines.add( cd.getUsedBytes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalBytes() + " " + GuiText.BytesUsed.getLocal() );
lines.add( cd.getStoredItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() );
}
}
}
+5 -4
View File
@@ -14,6 +14,8 @@ import appeng.api.implementations.guiobjects.IGuiItem;
import appeng.api.implementations.guiobjects.IGuiItemObject;
import appeng.api.implementations.items.IItemGroup;
import appeng.api.implementations.items.IStorageCell;
import appeng.api.storage.ICellInventory;
import appeng.api.storage.ICellInventoryHandler;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEItemStack;
@@ -25,7 +27,6 @@ import appeng.items.contents.CellConfig;
import appeng.items.contents.CellUpgrades;
import appeng.items.contents.PortableCellViewer;
import appeng.items.tools.powered.powersink.AEBasePoweredItem;
import appeng.me.storage.CellInventory;
import appeng.me.storage.CellInventoryHandler;
import appeng.util.Platform;
@@ -54,11 +55,11 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
if ( cdi instanceof CellInventoryHandler )
{
CellInventory cd = ((CellInventoryHandler) cdi).getCellInv();
ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv();
if ( cd != null )
{
lines.add( cd.usedBytes() + " " + GuiText.Of.getLocal() + " " + cd.totalBytes() + " " + GuiText.BytesUsed.getLocal() );
lines.add( cd.storedItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() );
lines.add( cd.getUsedBytes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalBytes() + " " + GuiText.BytesUsed.getLocal() );
lines.add( cd.getStoredItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() );
}
}
}
+4 -1
View File
@@ -10,6 +10,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.implementations.items.IAEWrench;
import appeng.core.features.AEFeature;
import appeng.items.AEBaseItem;
import appeng.util.Platform;
import buildcraft.api.tools.IToolWrench;
import cpw.mods.fml.common.Optional.Interface;
@@ -29,8 +30,10 @@ public class ToolQuartzWrench extends AEBaseItem implements IAEWrench, IToolWren
Block b = world.getBlock( x, y, z );
if ( b != null && !player.isSneaking() )
{
if ( b.rotateBlock( world, x, y, z, ForgeDirection.getOrientation( side ) ) )
ForgeDirection mySide = ForgeDirection.getOrientation( side );
if ( b.rotateBlock( world, x, y, z, mySide ) )
{
b.onNeighborBlockChange( world, x, y, z, Platform.air );
player.swingItem();
return !world.isRemote;
}