@@ -11,14 +11,14 @@ import appeng.core.features.IAEFeature;
|
||||
public class AEBaseItem extends Item implements IAEFeature
|
||||
{
|
||||
|
||||
String FeatureFullname;
|
||||
String FeatureSubname;
|
||||
String featureFullName;
|
||||
String featureSubName;
|
||||
AEFeatureHandler feature;
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return FeatureFullname;
|
||||
return featureFullName;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -29,7 +29,7 @@ public class AEBaseItem extends Item implements IAEFeature
|
||||
|
||||
public void setFeature(EnumSet<AEFeature> f)
|
||||
{
|
||||
feature = new AEFeatureHandler( f, this, FeatureSubname );
|
||||
feature = new AEFeatureHandler( f, this, featureSubName );
|
||||
}
|
||||
|
||||
public AEBaseItem(Class c) {
|
||||
@@ -37,9 +37,9 @@ public class AEBaseItem extends Item implements IAEFeature
|
||||
canRepair = false;
|
||||
}
|
||||
|
||||
public AEBaseItem(Class c, String subname) {
|
||||
FeatureSubname = subname;
|
||||
FeatureFullname = AEFeatureHandler.getName( c, subname );
|
||||
public AEBaseItem(Class c, String subName) {
|
||||
featureSubName = subName;
|
||||
featureFullName = AEFeatureHandler.getName( c, subName );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,7 @@ public class NetworkToolViewer implements INetworkTool
|
||||
this.is = is;
|
||||
gh = gHost;
|
||||
inv = new AppEngInternalInventory( null, 9 );
|
||||
if ( is.hasTagCompound() ) // prevent crash when opening network status creen.
|
||||
if ( is.hasTagCompound() ) // prevent crash when opening network status screen.
|
||||
inv.readFromNBT( Platform.openNbtData( is ), "inv" );
|
||||
}
|
||||
|
||||
|
||||
@@ -92,9 +92,9 @@ public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack is, EntityPlayer player, List details, boolean moar)
|
||||
public void addInformation(ItemStack is, EntityPlayer player, List details, boolean displayAdditionalInformation)
|
||||
{
|
||||
super.addInformation( is, player, details, moar );
|
||||
super.addInformation( is, player, details, displayAdditionalInformation );
|
||||
|
||||
MaterialType mt = getTypeByStack( is );
|
||||
if ( mt == null )
|
||||
@@ -168,7 +168,7 @@ public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent,
|
||||
throw new RuntimeException( "Cannot create the same material twice..." );
|
||||
}
|
||||
|
||||
public void unduplicate()
|
||||
public void makeUnique()
|
||||
{
|
||||
for (MaterialType mt : ImmutableSet.copyOf( dmgToMaterial.values() ))
|
||||
{
|
||||
|
||||
@@ -88,7 +88,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
list.addAll( subTypes );
|
||||
}
|
||||
|
||||
public ItemStack createFromInts(int[] ids)
|
||||
public ItemStack createFromIDs(int[] ids)
|
||||
{
|
||||
ItemStack is = new ItemStack( AEApi.instance().items().itemFacade.item() );
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
@@ -142,10 +142,10 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack is)
|
||||
{
|
||||
return "item.appliedenergistics2." + getname( is );
|
||||
return "item.appliedenergistics2." + getName( is );
|
||||
}
|
||||
|
||||
public String getname(ItemStack is)
|
||||
public String getName(ItemStack is)
|
||||
{
|
||||
return AEFeatureHandler.getName( ItemMultiPart.class, getTypeByStack( is ).name() );
|
||||
}
|
||||
@@ -173,7 +173,7 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup
|
||||
{
|
||||
for (Entry<Integer, PartTypeIst> part : dmgToPart.entrySet())
|
||||
{
|
||||
String tex = "appliedenergistics2:" + getname( new ItemStack( this, 1, part.getKey() ) );
|
||||
String tex = "appliedenergistics2:" + getName( new ItemStack( this, 1, part.getKey() ) );
|
||||
part.getValue().ico = par1IconRegister.registerIcon( tex );
|
||||
}
|
||||
}
|
||||
@@ -266,7 +266,7 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup
|
||||
return null;
|
||||
}
|
||||
|
||||
public ItemStack getStackFromTypeAndVarient(PartType mt, int variant)
|
||||
public ItemStack getStackFromTypeAndVariant(PartType mt, int variant)
|
||||
{
|
||||
return new ItemStack( this, 1, mt.baseDamage + variant );
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
|
||||
}
|
||||
|
||||
@Override
|
||||
public int BytePerType(ItemStack iscellItem)
|
||||
public int BytePerType(ItemStack cell)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
@@ -197,15 +197,15 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
|
||||
if ( Platform.isClient() )
|
||||
return false;
|
||||
|
||||
InventoryPlayer pinv = player.inventory;
|
||||
InventoryPlayer playerInventory = player.inventory;
|
||||
IMEInventory<IAEItemStack> inv = AEApi.instance().registries().cell().getCellInventory( stack, null, StorageChannel.ITEMS );
|
||||
if ( inv != null && pinv.getCurrentItem() == stack )
|
||||
if ( inv != null && playerInventory.getCurrentItem() == stack )
|
||||
{
|
||||
InventoryAdaptor ia = InventoryAdaptor.getAdaptor( player, ForgeDirection.UNKNOWN );
|
||||
IItemList<IAEItemStack> list = inv.getAvailableItems( StorageChannel.ITEMS.createList() );
|
||||
if ( list.isEmpty() && ia != null )
|
||||
{
|
||||
pinv.setInventorySlotContents( pinv.currentItem, null );
|
||||
playerInventory.setInventorySlotContents( playerInventory.currentItem, null );
|
||||
|
||||
ItemStack extraB = ia.addItems( component.stack( 1 ) );
|
||||
ItemStack extraA = ia.addItems( AEApi.instance().materials().materialEmptyStorageCell.stack( 1 ) );
|
||||
|
||||
@@ -19,7 +19,7 @@ public class ToolChargedStaff extends AEBasePoweredItem
|
||||
public ToolChargedStaff() {
|
||||
super( ToolChargedStaff.class, null );
|
||||
setFeature( EnumSet.of( AEFeature.ChargedStaff, AEFeature.PoweredTools ) );
|
||||
maxStoredPower = AEConfig.instance.staff_battery;
|
||||
maxStoredPower = AEConfig.instance.chargedStaffBattery;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
public ToolColorApplicator() {
|
||||
super( ToolColorApplicator.class, null );
|
||||
setFeature( EnumSet.of( AEFeature.ColorApplicator, AEFeature.PoweredTools ) );
|
||||
maxStoredPower = AEConfig.instance.colorapplicator_battery;
|
||||
maxStoredPower = AEConfig.instance.colorApplicatorBattery;
|
||||
if ( Platform.isClient() )
|
||||
MinecraftForgeClient.registerItemRenderer( this, new ToolColorApplicatorRender() );
|
||||
}
|
||||
@@ -207,7 +207,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack is, EntityPlayer p, World w, int x, int y, int z, int side, float hitx, float hity, float hitz)
|
||||
public boolean onItemUse(ItemStack is, EntityPlayer p, World w, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
Block blk = w.getBlock( x, y, z );
|
||||
double powerPerUse = 100;
|
||||
@@ -232,14 +232,14 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
|
||||
if ( paintBall != null && paintBall.getItem() instanceof ItemSnowball )
|
||||
{
|
||||
ForgeDirection oside = ForgeDirection.getOrientation( side );
|
||||
ForgeDirection orientation = ForgeDirection.getOrientation( side );
|
||||
TileEntity te = w.getTileEntity( x, y, z );
|
||||
// clean cables.
|
||||
if ( te instanceof IColorableTile )
|
||||
{
|
||||
if ( getAECurrentPower( is ) > powerPerUse && ((IColorableTile) te).getColor() != AEColor.Transparent )
|
||||
{
|
||||
if ( ((IColorableTile) te).recolourBlock( oside, AEColor.Transparent, p ) )
|
||||
if ( ((IColorableTile) te).recolourBlock( orientation, AEColor.Transparent, p ) )
|
||||
{
|
||||
inv.extractItems( AEItemStack.create( paintBall ), Actionable.MODULATE, new BaseActionSource() );
|
||||
extractAEPower( is, powerPerUse );
|
||||
@@ -249,13 +249,13 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
}
|
||||
|
||||
// clean paint balls..
|
||||
Block testBlk = w.getBlock( x + oside.offsetX, y + oside.offsetY, z + oside.offsetZ );
|
||||
TileEntity painted = w.getTileEntity( x + oside.offsetX, y + oside.offsetY, z + oside.offsetZ );
|
||||
Block testBlk = w.getBlock( x + orientation.offsetX, y + orientation.offsetY, z + orientation.offsetZ );
|
||||
TileEntity painted = w.getTileEntity( x + orientation.offsetX, y + orientation.offsetY, z + orientation.offsetZ );
|
||||
if ( getAECurrentPower( is ) > powerPerUse && testBlk instanceof BlockPaint && painted instanceof TilePaint )
|
||||
{
|
||||
inv.extractItems( AEItemStack.create( paintBall ), Actionable.MODULATE, new BaseActionSource() );
|
||||
extractAEPower( is, powerPerUse );
|
||||
((TilePaint) painted).cleanSide( oside.getOpposite() );
|
||||
((TilePaint) painted).cleanSide( orientation.getOpposite() );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -390,7 +390,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
}
|
||||
|
||||
@Override
|
||||
public int BytePerType(ItemStack iscellItem)
|
||||
public int BytePerType(ItemStack cell)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
public ToolEntropyManipulator() {
|
||||
super( ToolEntropyManipulator.class, null );
|
||||
setFeature( EnumSet.of( AEFeature.EntropyManipulator, AEFeature.PoweredTools ) );
|
||||
maxStoredPower = AEConfig.instance.manipulator_battery;
|
||||
maxStoredPower = AEConfig.instance.entropyManipulatorBattery;
|
||||
|
||||
coolDown = new Hashtable<Combo, InWorldToolOperationResult>();
|
||||
coolDown.put( new Combo( Blocks.stone, 0 ), new InWorldToolOperationResult( new ItemStack( Blocks.cobblestone ) ) );
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
public ToolMassCannon() {
|
||||
super( ToolMassCannon.class, null );
|
||||
setFeature( EnumSet.of( AEFeature.MatterCannon, AEFeature.PoweredTools ) );
|
||||
maxStoredPower = AEConfig.instance.mattercannon_battery;
|
||||
maxStoredPower = AEConfig.instance.matterCannonBattery;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -104,10 +104,10 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
if ( inv != null )
|
||||
{
|
||||
IItemList itemList = inv.getAvailableItems( AEApi.instance().storage().createItemList() );
|
||||
IAEStack aeammo = itemList.getFirstItem();
|
||||
if ( aeammo instanceof IAEItemStack )
|
||||
IAEStack aeAmmo = itemList.getFirstItem();
|
||||
if ( aeAmmo instanceof IAEItemStack )
|
||||
{
|
||||
shots = Math.min( shots, (int) aeammo.getStackSize() );
|
||||
shots = Math.min( shots, (int) aeAmmo.getStackSize() );
|
||||
for (int sh = 0; sh < shots; sh++)
|
||||
{
|
||||
extractAEPower( item, 1600 );
|
||||
@@ -115,14 +115,14 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
if ( Platform.isClient() )
|
||||
return item;
|
||||
|
||||
aeammo.setStackSize( 1 );
|
||||
ItemStack ammo = ((IAEItemStack) aeammo).getItemStack();
|
||||
aeAmmo.setStackSize( 1 );
|
||||
ItemStack ammo = ((IAEItemStack) aeAmmo).getItemStack();
|
||||
if ( ammo == null )
|
||||
return item;
|
||||
|
||||
ammo.stackSize = 1;
|
||||
aeammo = inv.extractItems( aeammo, Actionable.MODULATE, new PlayerSource( p, null ) );
|
||||
if ( aeammo == null )
|
||||
aeAmmo = inv.extractItems( aeAmmo, Actionable.MODULATE, new PlayerSource( p, null ) );
|
||||
if ( aeAmmo == null )
|
||||
return item;
|
||||
|
||||
float f = 1.0F;
|
||||
@@ -147,7 +147,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
float penetration = AEApi.instance().registries().matterCannon().getPenetration( ammo ); // 196.96655f;
|
||||
if ( penetration <= 0 )
|
||||
{
|
||||
ItemStack type = ((IAEItemStack) aeammo).getItemStack();
|
||||
ItemStack type = ((IAEItemStack) aeAmmo).getItemStack();
|
||||
if ( type.getItem() instanceof ItemPaintBall )
|
||||
{
|
||||
shootPaintBalls( type, w, p, vec3, vec31, direction, d0, d1, d2 );
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
|
||||
public ToolPortableCell() {
|
||||
super( ToolPortableCell.class, null );
|
||||
setFeature( EnumSet.of( AEFeature.PortableCell, AEFeature.StorageCells, AEFeature.PoweredTools ) );
|
||||
maxStoredPower = AEConfig.instance.portablecell_battery;
|
||||
maxStoredPower = AEConfig.instance.portableCellBattery;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -49,7 +49,7 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack item, EntityPlayer player, World w, int x, int y, int z, int side,
|
||||
float hitx, float hity, float hitz)
|
||||
float hitX, float hitY, float hitZ)
|
||||
{
|
||||
onItemRightClick( item, w, player );
|
||||
return true;
|
||||
@@ -80,7 +80,7 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
|
||||
}
|
||||
|
||||
@Override
|
||||
public int BytePerType(ItemStack iscellItem)
|
||||
public int BytePerType(ItemStack cell)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless
|
||||
public ToolWirelessTerminal() {
|
||||
super( ToolWirelessTerminal.class, null );
|
||||
setFeature( EnumSet.of( AEFeature.WirelessAccessTerminal, AEFeature.PoweredTools ) );
|
||||
maxStoredPower = AEConfig.instance.wireless_battery;
|
||||
maxStoredPower = AEConfig.instance.wirelessTerminalBattery;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -41,7 +41,7 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack item, EntityPlayer player, World w, int x, int y, int z, int side,
|
||||
float hitx, float hity, float hitz)
|
||||
float hitX, float hitY, float hitZ)
|
||||
{
|
||||
onItemRightClick( item, w, player );
|
||||
return true;
|
||||
|
||||
@@ -3,8 +3,8 @@ package appeng.items.tools.powered.powersink;
|
||||
public class AEBasePoweredItem extends RedstoneFlux
|
||||
{
|
||||
|
||||
public AEBasePoweredItem(Class c, String subname) {
|
||||
super( c, subname );
|
||||
public AEBasePoweredItem(Class c, String subName) {
|
||||
super( c, subName );
|
||||
setMaxStackSize( 1 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ public class AERootPoweredItem extends AEBaseItem implements IAEItemPowerStorage
|
||||
|
||||
public double maxStoredPower = 200000;
|
||||
|
||||
public AERootPoweredItem(Class c, String subname) {
|
||||
super( c, subname );
|
||||
public AERootPoweredItem(Class c, String subName) {
|
||||
super( c, subName );
|
||||
setMaxDamage( 32 );
|
||||
hasSubtypes = false;
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ import appeng.transformer.annotations.integration.Method;
|
||||
public class IC2 extends AERootPoweredItem implements IElectricItemManager, ISpecialElectricItem
|
||||
{
|
||||
|
||||
public IC2(Class c, String subname) {
|
||||
super( c, subname );
|
||||
public IC2(Class c, String subName) {
|
||||
super( c, subName );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,8 +9,8 @@ import cofh.api.energy.IEnergyContainerItem;
|
||||
public class RedstoneFlux extends IC2 implements IEnergyContainerItem
|
||||
{
|
||||
|
||||
public RedstoneFlux(Class c, String subname) {
|
||||
super( c, subname );
|
||||
public RedstoneFlux(Class c, String subName) {
|
||||
super( c, subName );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,7 +5,7 @@ package appeng.items.tools.powered.powersink;
|
||||
public class UniversalElectricity extends ThermalExpansion implements IItemElectric
|
||||
{
|
||||
*
|
||||
* public UniversalElectricity(Class c, String subname) { super( c, subname ); }
|
||||
* public UniversalElectricity(Class c, String subName) { super( c, subName ); }
|
||||
*
|
||||
* @Override public float recharge(ItemStack is, float energy, boolean
|
||||
* doRecharge) { return (float) (energy - injectExternalPower( PowerUnits.KJ,
|
||||
|
||||
@@ -59,7 +59,7 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack is, EntityPlayer p, World w, int x, int y, int z, int s, float hitx, float hity, float hitz)
|
||||
public boolean onItemUse(ItemStack is, EntityPlayer p, World w, int x, int y, int z, int s, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if ( Platform.isServer() )
|
||||
Platform.openGUI( p, null, ForgeDirection.UNKNOWN, GuiBridge.GUI_QUARTZ_KNIFE );
|
||||
|
||||
Reference in New Issue
Block a user