Format sourcecode
This commit is contained in:
@@ -91,13 +91,13 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
static
|
||||
{
|
||||
for( final AEColor color : AEColor.VALID_COLORS )
|
||||
{
|
||||
{
|
||||
final String dyeName = color.dye.getUnlocalizedName();
|
||||
final String oreDictName = "dye" + WordUtils.capitalize( dyeName );
|
||||
final int oreDictId = OreDictionary.getOreID( oreDictName );
|
||||
|
||||
ORE_TO_COLOR.put( oreDictId, color );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ToolColorApplicator()
|
||||
@@ -108,7 +108,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
@Override
|
||||
public EnumActionResult onItemUse( EntityPlayer p, World w, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ )
|
||||
{
|
||||
return this.onItemUse( p.getHeldItem(hand), p, w, pos, hand, side, hitX, hitY, hitZ );
|
||||
return this.onItemUse( p.getHeldItem( hand ), p, w, pos, hand, side, hitX, hitY, hitZ );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -285,7 +285,8 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
list.add( i );
|
||||
}
|
||||
|
||||
Collections.sort( list, new Comparator<IAEItemStack>(){
|
||||
Collections.sort( list, new Comparator<IAEItemStack>()
|
||||
{
|
||||
|
||||
@Override
|
||||
public int compare( final IAEItemStack a, final IAEItemStack b )
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.items.tools.powered;
|
||||
|
||||
|
||||
@@ -32,7 +33,8 @@ public class ToolColorApplicatorRendering extends ItemRenderingCustomizer
|
||||
|
||||
private ModelResourceLocation getMesh( ItemStack itemStack )
|
||||
{
|
||||
// If the stack has no color, don't use the colored model since the impact of calling getColor for every quad is extremely high,
|
||||
// If the stack has no color, don't use the colored model since the impact of calling getColor for every quad is
|
||||
// extremely high,
|
||||
// if the stack tries to re-search its inventory for a new paintball everytime
|
||||
AEColor col = ( (ToolColorApplicator) itemStack.getItem() ).getActiveColor( itemStack );
|
||||
return ( col != null ) ? MODEL_COLORED : MODEL_UNCOLORED;
|
||||
|
||||
@@ -66,10 +66,13 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
this.heatUp = new HashMap<InWorldToolOperationIngredient, InWorldToolOperationResult>();
|
||||
this.coolDown = new HashMap<InWorldToolOperationIngredient, InWorldToolOperationResult>();
|
||||
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.STONE.getDefaultState() ), new InWorldToolOperationResult( new ItemStack( Blocks.COBBLESTONE ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.STONEBRICK.getDefaultState() ), new InWorldToolOperationResult( new ItemStack( Blocks.STONEBRICK, 1, 2 ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.STONE.getDefaultState() ),
|
||||
new InWorldToolOperationResult( new ItemStack( Blocks.COBBLESTONE ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.STONEBRICK.getDefaultState() ),
|
||||
new InWorldToolOperationResult( new ItemStack( Blocks.STONEBRICK, 1, 2 ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.LAVA, true ), new InWorldToolOperationResult( new ItemStack( Blocks.OBSIDIAN ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.FLOWING_LAVA, true ), new InWorldToolOperationResult( new ItemStack( Blocks.OBSIDIAN ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.FLOWING_LAVA, true ),
|
||||
new InWorldToolOperationResult( new ItemStack( Blocks.OBSIDIAN ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.GRASS, true ), new InWorldToolOperationResult( new ItemStack( Blocks.DIRT ) ) );
|
||||
|
||||
final List<ItemStack> snowBalls = new ArrayList<ItemStack>();
|
||||
@@ -215,7 +218,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
|
||||
if( target == null )
|
||||
{
|
||||
return new ActionResult<ItemStack>( EnumActionResult.FAIL, p.getHeldItem(hand) );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.FAIL, p.getHeldItem( hand ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -232,13 +235,13 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
}
|
||||
}
|
||||
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem(hand) );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem( hand ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse( EntityPlayer p, World w, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ )
|
||||
{
|
||||
return this.onItemUse( p.getHeldItem(hand), p, w, pos, hand, side, hitX, hitY, hitZ );
|
||||
return this.onItemUse( p.getHeldItem( hand ), p, w, pos, hand, side, hitX, hitY, hitZ );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -299,7 +302,8 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
{
|
||||
if( result.getItem() instanceof ItemBlock )
|
||||
{
|
||||
if( Block.getBlockFromItem( result.getItem() ) == blockID && result.getItem().getDamage( result ) == blockID.getMetaFromState( state ) )
|
||||
if( Block.getBlockFromItem( result.getItem() ) == blockID && result.getItem().getDamage( result ) == blockID
|
||||
.getMetaFromState( state ) )
|
||||
{
|
||||
canFurnaceable = false;
|
||||
}
|
||||
@@ -318,7 +322,8 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
{
|
||||
this.extractAEPower( item, 1600 );
|
||||
final InWorldToolOperationResult or = InWorldToolOperationResult.getBlockOperationResult( out.toArray( new ItemStack[out.size()] ) );
|
||||
w.playSound( p, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.PLAYERS, 1.0F, itemRand.nextFloat() * 0.4F + 0.8F );
|
||||
w.playSound( p, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.PLAYERS, 1.0F,
|
||||
itemRand.nextFloat() * 0.4F + 0.8F );
|
||||
|
||||
if( or.getBlockItem().isEmpty() )
|
||||
{
|
||||
@@ -349,7 +354,8 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
if( w.isAirBlock( offsetPos ) )
|
||||
{
|
||||
this.extractAEPower( item, 1600 );
|
||||
w.playSound( p, offsetPos.getX() + 0.5D, offsetPos.getY() + 0.5D, offsetPos.getZ() + 0.5D, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.PLAYERS, 1.0F, itemRand.nextFloat() * 0.4F + 0.8F );
|
||||
w.playSound( p, offsetPos.getX() + 0.5D, offsetPos.getY() + 0.5D, offsetPos.getZ() + 0.5D, SoundEvents.ITEM_FLINTANDSTEEL_USE,
|
||||
SoundCategory.PLAYERS, 1.0F, itemRand.nextFloat() * 0.4F + 0.8F );
|
||||
w.setBlockState( offsetPos, Blocks.FIRE.getDefaultState() );
|
||||
}
|
||||
|
||||
|
||||
@@ -112,17 +112,17 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick( final World w, final EntityPlayer p, final @Nullable EnumHand hand )
|
||||
{
|
||||
if( this.getAECurrentPower( p.getHeldItem(hand) ) > 1600 )
|
||||
if( this.getAECurrentPower( p.getHeldItem( hand ) ) > 1600 )
|
||||
{
|
||||
int shots = 1;
|
||||
|
||||
final CellUpgrades cu = (CellUpgrades) this.getUpgradesInventory( p.getHeldItem(hand) );
|
||||
final CellUpgrades cu = (CellUpgrades) this.getUpgradesInventory( p.getHeldItem( hand ) );
|
||||
if( cu != null )
|
||||
{
|
||||
shots += cu.getInstalledUpgrades( Upgrades.SPEED );
|
||||
}
|
||||
|
||||
final IMEInventory inv = AEApi.instance().registries().cell().getCellInventory( p.getHeldItem(hand), null, StorageChannel.ITEMS );
|
||||
final IMEInventory inv = AEApi.instance().registries().cell().getCellInventory( p.getHeldItem( hand ), null, StorageChannel.ITEMS );
|
||||
if( inv != null )
|
||||
{
|
||||
final IItemList itemList = inv.getAvailableItems( AEApi.instance().storage().createItemList() );
|
||||
@@ -132,25 +132,25 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
|
||||
shots = Math.min( shots, (int) aeAmmo.getStackSize() );
|
||||
for( int sh = 0; sh < shots; sh++ )
|
||||
{
|
||||
this.extractAEPower( p.getHeldItem(hand), 1600 );
|
||||
this.extractAEPower( p.getHeldItem( hand ), 1600 );
|
||||
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem(hand) );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem( hand ) );
|
||||
}
|
||||
|
||||
aeAmmo.setStackSize( 1 );
|
||||
final ItemStack ammo = ( (IAEItemStack) aeAmmo ).getItemStack();
|
||||
if( ammo == null )
|
||||
{
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem(hand) );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem( hand ) );
|
||||
}
|
||||
|
||||
ammo.setCount( 1 );
|
||||
aeAmmo = inv.extractItems( aeAmmo, Actionable.MODULATE, new PlayerSource( p, null ) );
|
||||
if( aeAmmo == null )
|
||||
{
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem(hand) );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem( hand ) );
|
||||
}
|
||||
|
||||
final LookDirection dir = Platform.getPlayerRay( p, p.getEyeHeight() );
|
||||
@@ -172,7 +172,7 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
|
||||
{
|
||||
this.shootPaintBalls( type, w, p, Vec3d, Vec3d1, direction, d0, d1, d2 );
|
||||
}
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem(hand) );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem( hand ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -186,16 +186,17 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
|
||||
{
|
||||
p.sendMessage( PlayerMessages.AmmoDepleted.get() );
|
||||
}
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem(hand) );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem( hand ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
return new ActionResult<ItemStack>( EnumActionResult.FAIL, p.getHeldItem(hand) );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.FAIL, p.getHeldItem( hand ) );
|
||||
}
|
||||
|
||||
private void shootPaintBalls( final ItemStack type, final World w, final EntityPlayer p, final Vec3d Vec3d, final Vec3d Vec3d1, final Vec3d direction, final double d0, final double d1, final double d2 )
|
||||
{
|
||||
final AxisAlignedBB bb = new AxisAlignedBB( Math.min( Vec3d.x, Vec3d1.x ), Math.min( Vec3d.y, Vec3d1.y ), Math.min( Vec3d.z, Vec3d1.z ), Math.max( Vec3d.x, Vec3d1.x ), Math.max( Vec3d.y, Vec3d1.y ), Math.max( Vec3d.z, Vec3d1.z ) ).grow( 16, 16, 16 );
|
||||
final AxisAlignedBB bb = new AxisAlignedBB( Math.min( Vec3d.x, Vec3d1.x ), Math.min( Vec3d.y, Vec3d1.y ), Math.min( Vec3d.z, Vec3d1.z ), Math
|
||||
.max( Vec3d.x, Vec3d1.x ), Math.max( Vec3d.y, Vec3d1.y ), Math.max( Vec3d.z, Vec3d1.z ) ).grow( 16, 16, 16 );
|
||||
|
||||
Entity entity = null;
|
||||
final List list = w.getEntitiesWithinAABBExcludingEntity( p, bb );
|
||||
@@ -248,7 +249,9 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
|
||||
|
||||
try
|
||||
{
|
||||
AppEng.proxy.sendToAllNearExcept( null, d0, d1, d2, 128, w, new PacketMatterCannon( d0, d1, d2, (float) direction.x, (float) direction.y, (float) direction.z, (byte) ( pos == null ? 32 : pos.hitVec.squareDistanceTo( vec ) + 1 ) ) );
|
||||
AppEng.proxy.sendToAllNearExcept( null, d0, d1, d2, 128, w,
|
||||
new PacketMatterCannon( d0, d1, d2, (float) direction.x, (float) direction.y, (float) direction.z, (byte) ( pos == null ? 32 : pos.hitVec
|
||||
.squareDistanceTo( vec ) + 1 ) ) );
|
||||
}
|
||||
catch( final Exception err )
|
||||
{
|
||||
@@ -313,7 +316,8 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
|
||||
{
|
||||
hasDestroyed = false;
|
||||
|
||||
final AxisAlignedBB bb = new AxisAlignedBB( Math.min( Vec3d.x, Vec3d1.x ), Math.min( Vec3d.y, Vec3d1.y ), Math.min( Vec3d.z, Vec3d1.z ), Math.max( Vec3d.x, Vec3d1.x ), Math.max( Vec3d.y, Vec3d1.y ), Math.max( Vec3d.z, Vec3d1.z ) ).grow( 16, 16, 16 );
|
||||
final AxisAlignedBB bb = new AxisAlignedBB( Math.min( Vec3d.x, Vec3d1.x ), Math.min( Vec3d.y, Vec3d1.y ), Math.min( Vec3d.z, Vec3d1.z ), Math
|
||||
.max( Vec3d.x, Vec3d1.x ), Math.max( Vec3d.y, Vec3d1.y ), Math.max( Vec3d.z, Vec3d1.z ) ).grow( 16, 16, 16 );
|
||||
|
||||
Entity entity = null;
|
||||
final List list = w.getEntitiesWithinAABBExcludingEntity( p, bb );
|
||||
@@ -365,7 +369,9 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
|
||||
|
||||
try
|
||||
{
|
||||
AppEng.proxy.sendToAllNearExcept( null, d0, d1, d2, 128, w, new PacketMatterCannon( d0, d1, d2, (float) direction.x, (float) direction.y, (float) direction.z, (byte) ( pos == null ? 32 : pos.hitVec.squareDistanceTo( vec ) + 1 ) ) );
|
||||
AppEng.proxy.sendToAllNearExcept( null, d0, d1, d2, 128, w,
|
||||
new PacketMatterCannon( d0, d1, d2, (float) direction.x, (float) direction.y, (float) direction.z, (byte) ( pos == null ? 32 : pos.hitVec
|
||||
.squareDistanceTo( vec ) + 1 ) ) );
|
||||
}
|
||||
catch( final Exception err )
|
||||
{
|
||||
|
||||
@@ -68,7 +68,7 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
|
||||
public ActionResult<ItemStack> onItemRightClick( final World w, final EntityPlayer player, final EnumHand hand )
|
||||
{
|
||||
Platform.openGUI( player, null, AEPartLocation.INTERNAL, GuiBridge.GUI_PORTABLE_CELL );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, player.getHeldItem(hand) );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, player.getHeldItem( hand ) );
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
@@ -190,8 +190,8 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCauseReequipAnimation( ItemStack oldStack, ItemStack newStack, boolean slotChanged )
|
||||
public boolean shouldCauseReequipAnimation( ItemStack oldStack, ItemStack newStack, boolean slotChanged )
|
||||
{
|
||||
return slotChanged;
|
||||
return slotChanged;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,8 +59,8 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick( final World w, final EntityPlayer player, final EnumHand hand )
|
||||
{
|
||||
AEApi.instance().registries().wireless().openWirelessTerminalGui( player.getHeldItem(hand), w, player );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, player.getHeldItem(hand) );
|
||||
AEApi.instance().registries().wireless().openWirelessTerminalGui( player.getHeldItem( hand ), w, player );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, player.getHeldItem( hand ) );
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
@@ -120,7 +120,8 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless
|
||||
@Override
|
||||
public IConfigManager getConfigManager( final ItemStack target )
|
||||
{
|
||||
final ConfigManager out = new ConfigManager( new IConfigManagerHost(){
|
||||
final ConfigManager out = new ConfigManager( new IConfigManagerHost()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void updateSetting( final IConfigManager manager, final Enum settingName, final Enum newValue )
|
||||
@@ -153,9 +154,9 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless
|
||||
tag.setString( "name", name );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCauseReequipAnimation( ItemStack oldStack, ItemStack newStack, boolean slotChanged )
|
||||
@Override
|
||||
public boolean shouldCauseReequipAnimation( ItemStack oldStack, ItemStack newStack, boolean slotChanged )
|
||||
{
|
||||
return slotChanged;
|
||||
}
|
||||
return slotChanged;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
///*
|
||||
/// *
|
||||
// * This file is part of Applied Energistics 2.
|
||||
// * Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
// *
|
||||
@@ -9,117 +9,118 @@
|
||||
// *
|
||||
// * Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// * GNU Lesser General Public License for more details.
|
||||
// *
|
||||
// * You should have received a copy of the GNU Lesser General Public License
|
||||
// * along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
// * along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
// */
|
||||
//
|
||||
//package appeng.items.tools.powered.powersink;
|
||||
// package appeng.items.tools.powered.powersink;
|
||||
//
|
||||
//
|
||||
//import net.minecraft.entity.EntityLivingBase;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
// import net.minecraft.entity.EntityLivingBase;
|
||||
// import net.minecraft.item.ItemStack;
|
||||
//
|
||||
//import ic2.api.item.IElectricItemManager;
|
||||
//import ic2.api.item.ISpecialElectricItem;
|
||||
// import ic2.api.item.IElectricItemManager;
|
||||
// import ic2.api.item.ISpecialElectricItem;
|
||||
//
|
||||
//import appeng.api.config.PowerUnits;
|
||||
//import appeng.coremod.annotations.Integration.Interface;
|
||||
//import appeng.coremod.annotations.Integration.InterfaceList;
|
||||
//import appeng.coremod.annotations.Integration.Method;
|
||||
//import appeng.integration.IntegrationType;
|
||||
// import appeng.api.config.PowerUnits;
|
||||
// import appeng.coremod.annotations.Integration.Interface;
|
||||
// import appeng.coremod.annotations.Integration.InterfaceList;
|
||||
// import appeng.coremod.annotations.Integration.Method;
|
||||
// import appeng.integration.IntegrationType;
|
||||
//
|
||||
//
|
||||
//@InterfaceList( value = {
|
||||
// @Interface( iface = "ic2.api.item.ISpecialElectricItem", iname = IntegrationType.IC2 ),
|
||||
// @Interface( iface = "ic2.api.item.IElectricItemManager", iname = IntegrationType.IC2 )
|
||||
//} )
|
||||
//public abstract class IC2 extends AERootPoweredItem implements IElectricItemManager, ISpecialElectricItem
|
||||
//{
|
||||
// public IC2( double powerCapacity )
|
||||
// {
|
||||
// super( powerCapacity );
|
||||
// }
|
||||
// @InterfaceList( value = {
|
||||
// @Interface( iface = "ic2.api.item.ISpecialElectricItem", iname = IntegrationType.IC2 ),
|
||||
// @Interface( iface = "ic2.api.item.IElectricItemManager", iname = IntegrationType.IC2 )
|
||||
// } )
|
||||
// public abstract class IC2 extends AERootPoweredItem implements IElectricItemManager, ISpecialElectricItem
|
||||
// {
|
||||
// public IC2( double powerCapacity )
|
||||
// {
|
||||
// super( powerCapacity );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public double charge( ItemStack is, double amount, int tier, boolean ignoreTransferLimit, boolean simulate )
|
||||
// {
|
||||
// double addedAmt = amount;
|
||||
// double limit = this.getTransferLimit( is );
|
||||
// @Override
|
||||
// public double charge( ItemStack is, double amount, int tier, boolean ignoreTransferLimit, boolean simulate )
|
||||
// {
|
||||
// double addedAmt = amount;
|
||||
// double limit = this.getTransferLimit( is );
|
||||
//
|
||||
// if( !ignoreTransferLimit && amount > limit )
|
||||
// {
|
||||
// addedAmt = limit;
|
||||
// }
|
||||
// if( !ignoreTransferLimit && amount > limit )
|
||||
// {
|
||||
// addedAmt = limit;
|
||||
// }
|
||||
//
|
||||
// return addedAmt - ( (int) this.injectExternalPower( PowerUnits.EU, is, addedAmt, simulate ) );
|
||||
// }
|
||||
// return addedAmt - ( (int) this.injectExternalPower( PowerUnits.EU, is, addedAmt, simulate ) );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public double discharge( ItemStack itemStack, double amount, int tier, boolean ignoreTransferLimit, boolean externally, boolean simulate )
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
// @Override
|
||||
// public double discharge( ItemStack itemStack, double amount, int tier, boolean ignoreTransferLimit, boolean
|
||||
/// externally, boolean simulate )
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public double getCharge( ItemStack is )
|
||||
// {
|
||||
// return (int) PowerUnits.AE.convertTo( PowerUnits.EU, this.getAECurrentPower( is ) );
|
||||
// }
|
||||
// @Override
|
||||
// public double getCharge( ItemStack is )
|
||||
// {
|
||||
// return (int) PowerUnits.AE.convertTo( PowerUnits.EU, this.getAECurrentPower( is ) );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canUse( ItemStack is, double amount )
|
||||
// {
|
||||
// return this.getCharge( is ) > amount;
|
||||
// }
|
||||
// @Override
|
||||
// public boolean canUse( ItemStack is, double amount )
|
||||
// {
|
||||
// return this.getCharge( is ) > amount;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean use( ItemStack is, double amount, EntityLivingBase entity )
|
||||
// {
|
||||
// if( this.canUse( is, amount ) )
|
||||
// {
|
||||
// // use the power..
|
||||
// this.extractAEPower( is, PowerUnits.EU.convertTo( PowerUnits.AE, amount ) );
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// @Override
|
||||
// public boolean use( ItemStack is, double amount, EntityLivingBase entity )
|
||||
// {
|
||||
// if( this.canUse( is, amount ) )
|
||||
// {
|
||||
// // use the power..
|
||||
// this.extractAEPower( is, PowerUnits.EU.convertTo( PowerUnits.AE, amount ) );
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void chargeFromArmor( ItemStack itemStack, EntityLivingBase entity )
|
||||
// {
|
||||
// // wtf?
|
||||
// }
|
||||
// @Override
|
||||
// public void chargeFromArmor( ItemStack itemStack, EntityLivingBase entity )
|
||||
// {
|
||||
// // wtf?
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getToolTip( ItemStack itemStack )
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// @Override
|
||||
// public String getToolTip( ItemStack itemStack )
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public double getMaxCharge( ItemStack itemStack )
|
||||
// {
|
||||
// return PowerUnits.AE.convertTo( PowerUnits.EU, this.getAEMaxPower( itemStack ) );
|
||||
// }
|
||||
// @Override
|
||||
// public double getMaxCharge( ItemStack itemStack )
|
||||
// {
|
||||
// return PowerUnits.AE.convertTo( PowerUnits.EU, this.getAEMaxPower( itemStack ) );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int getTier( ItemStack itemStack )
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
// @Override
|
||||
// public int getTier( ItemStack itemStack )
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
//
|
||||
// private double getTransferLimit( ItemStack itemStack )
|
||||
// {
|
||||
// return Math.max( 32, this.getMaxCharge( itemStack ) / 200 );
|
||||
// }
|
||||
// private double getTransferLimit( ItemStack itemStack )
|
||||
// {
|
||||
// return Math.max( 32, this.getMaxCharge( itemStack ) / 200 );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Method( iname = IntegrationType.IC2 )
|
||||
// public IElectricItemManager getManager( ItemStack itemStack )
|
||||
// {
|
||||
// return this;
|
||||
// }
|
||||
//}
|
||||
// @Override
|
||||
// @Method( iname = IntegrationType.IC2 )
|
||||
// public IElectricItemManager getManager( ItemStack itemStack )
|
||||
// {
|
||||
// return this;
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user