Relocate Source to proper directory.
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import net.mcft.copy.betterstorage.api.crate.ICrateStorage;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
public class BSCrate implements IMEInventory<IAEItemStack>
|
||||
{
|
||||
|
||||
ICrateStorage cs;
|
||||
ForgeDirection side;
|
||||
|
||||
public BSCrate(Object object, ForgeDirection d) {
|
||||
cs = (ICrateStorage) object;
|
||||
side = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StorageChannel getChannel()
|
||||
{
|
||||
return StorageChannel.ITEMS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEItemStack injectItems(IAEItemStack input, Actionable mode, BaseActionSource src)
|
||||
{
|
||||
if ( mode == Actionable.SIMULATE )
|
||||
return null;
|
||||
|
||||
ItemStack failed = cs.insertItems( input.getItemStack() );
|
||||
if ( failed == null )
|
||||
return null;
|
||||
input.setStackSize( failed.stackSize );
|
||||
return input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEItemStack extractItems(IAEItemStack request, Actionable mode, BaseActionSource src)
|
||||
{
|
||||
if ( mode == Actionable.SIMULATE )
|
||||
{
|
||||
int howMany = cs.getItemCount( request.getItemStack() );
|
||||
return howMany > request.getStackSize() ? request : request.copy().setStackSize( howMany );
|
||||
}
|
||||
|
||||
ItemStack Obtained = cs.extractItems( request.getItemStack(), (int) request.getStackSize() );
|
||||
return AEItemStack.create( Obtained );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemList getAvailableItems(IItemList out)
|
||||
{
|
||||
for (ItemStack is : cs.getContents())
|
||||
{
|
||||
out.add( AEItemStack.create( is ) );
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import net.mcft.copy.betterstorage.api.crate.ICrateStorage;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.IExternalStorageHandler;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
|
||||
public class BSCrateHandler implements IExternalStorageHandler
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource mySrc)
|
||||
{
|
||||
return channel == StorageChannel.ITEMS && te instanceof ICrateStorage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource src)
|
||||
{
|
||||
if ( channel == StorageChannel.ITEMS )
|
||||
return new BSCrate( te, ForgeDirection.UNKNOWN );
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import net.mcft.copy.betterstorage.api.crate.ICrateStorage;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.inv.IInventoryDestination;
|
||||
import appeng.util.inv.ItemSlot;
|
||||
import appeng.util.iterators.StackToSlotIterator;
|
||||
|
||||
public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||
{
|
||||
|
||||
ICrateStorage cs;
|
||||
ForgeDirection side;
|
||||
|
||||
public BSCrateStorageAdaptor(Object te, ForgeDirection d) {
|
||||
cs = (ICrateStorage) te;
|
||||
side = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeItems(int how_many, ItemStack Filter, IInventoryDestination dest)
|
||||
{
|
||||
ItemStack target = null;
|
||||
|
||||
for (ItemStack is : cs.getContents())
|
||||
{
|
||||
if ( is != null )
|
||||
{
|
||||
if ( is.stackSize > 0 && (Filter == null || Platform.isSameItem( Filter, is )) )
|
||||
{
|
||||
if ( dest == null || dest.canInsert( is ) )
|
||||
{
|
||||
target = is;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( target != null )
|
||||
{
|
||||
ItemStack f = Platform.cloneItemStack( target );
|
||||
f.stackSize = how_many;
|
||||
return cs.extractItems( f, how_many );
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateRemove(int how_many, ItemStack Filter, IInventoryDestination dest)
|
||||
{
|
||||
ItemStack target = null;
|
||||
|
||||
for (ItemStack is : cs.getContents())
|
||||
{
|
||||
if ( is != null )
|
||||
{
|
||||
if ( is.stackSize > 0 && (Filter == null || Platform.isSameItem( Filter, is )) )
|
||||
{
|
||||
if ( dest == null || dest.canInsert( is ) )
|
||||
{
|
||||
target = is;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( target != null )
|
||||
{
|
||||
int cnt = cs.getItemCount( target );
|
||||
if ( cnt == 0 )
|
||||
return null;
|
||||
if ( cnt > how_many )
|
||||
cnt = how_many;
|
||||
ItemStack c = target.copy();
|
||||
c.stackSize = cnt;
|
||||
return c;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeSimilarItems(int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination dest)
|
||||
{
|
||||
ItemStack target = null;
|
||||
|
||||
for (ItemStack is : cs.getContents())
|
||||
{
|
||||
if ( is != null )
|
||||
{
|
||||
if ( is.stackSize > 0 && (filter == null || Platform.isSameItemFuzzy( filter, is, fuzzyMode )) )
|
||||
{
|
||||
if ( dest == null || dest.canInsert( is ) )
|
||||
{
|
||||
target = is;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( target != null )
|
||||
{
|
||||
ItemStack f = Platform.cloneItemStack( target );
|
||||
f.stackSize = amount;
|
||||
return cs.extractItems( f, amount );
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateSimilarRemove(int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination dest)
|
||||
{
|
||||
ItemStack target = null;
|
||||
|
||||
for (ItemStack is : cs.getContents())
|
||||
{
|
||||
if ( is != null )
|
||||
{
|
||||
if ( is.stackSize > 0 && (filter == null || Platform.isSameItemFuzzy( filter, is, fuzzyMode )) )
|
||||
{
|
||||
if ( dest == null || dest.canInsert( is ) )
|
||||
{
|
||||
target = is;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( target != null )
|
||||
{
|
||||
int cnt = cs.getItemCount( target );
|
||||
if ( cnt == 0 )
|
||||
return null;
|
||||
if ( cnt > how_many )
|
||||
cnt = how_many;
|
||||
ItemStack c = target.copy();
|
||||
c.stackSize = cnt;
|
||||
return c;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack addItems(ItemStack A)
|
||||
{
|
||||
return cs.insertItems( A );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateAdd(ItemStack A)
|
||||
{
|
||||
int items = cs.getSpaceForItem( A );
|
||||
ItemStack B = Platform.cloneItemStack( A );
|
||||
if ( A.stackSize <= items )
|
||||
return null;
|
||||
B.stackSize -= items;
|
||||
return B;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsItems()
|
||||
{
|
||||
return cs.getUniqueItems() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<ItemSlot> iterator()
|
||||
{
|
||||
return new StackToSlotIterator( cs.getContents().iterator() );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
|
||||
public class FMPPacketEvent extends Event
|
||||
{
|
||||
|
||||
public final EntityPlayerMP sender;
|
||||
|
||||
public FMPPacketEvent(EntityPlayerMP sender) {
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.integration.abstraction.IFZ;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
||||
{
|
||||
|
||||
private final TileEntity te;
|
||||
IFZ fProxy;
|
||||
|
||||
public FactorizationBarrel(IFZ proxy, TileEntity tile) {
|
||||
te = tile;
|
||||
fProxy = proxy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StorageChannel getChannel()
|
||||
{
|
||||
return StorageChannel.ITEMS;
|
||||
}
|
||||
|
||||
public long remainingItemTypes()
|
||||
{
|
||||
return fProxy.barrelGetItem( te ) == null ? 1 : 0;
|
||||
}
|
||||
|
||||
public long remainingItemCount()
|
||||
{
|
||||
return fProxy.barrelGetMaxItemCount( te ) - fProxy.barrelGetItemCount( te );
|
||||
}
|
||||
|
||||
public boolean containsItemType(IAEItemStack i, boolean acceptEmpty)
|
||||
{
|
||||
ItemStack currentItem = fProxy.barrelGetItem( te );
|
||||
|
||||
// empty barrels want your love too!
|
||||
if ( acceptEmpty && currentItem == null )
|
||||
return true;
|
||||
|
||||
return i.equals( currentItem );
|
||||
}
|
||||
|
||||
public long storedItemCount()
|
||||
{
|
||||
return fProxy.barrelGetItemCount( te );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEItemStack injectItems(IAEItemStack input, Actionable mode, BaseActionSource src)
|
||||
{
|
||||
if ( input == null )
|
||||
return null;
|
||||
if ( input.getStackSize() == 0 )
|
||||
return null;
|
||||
|
||||
ItemStack shared = input.getItemStack();
|
||||
if ( shared.isItemDamaged() )
|
||||
return input;
|
||||
|
||||
if ( remainingItemTypes() > 0 )
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
fProxy.setItemType( te, input.getItemStack() );
|
||||
}
|
||||
|
||||
if ( containsItemType( input, mode == Actionable.SIMULATE ) )
|
||||
{
|
||||
int max = fProxy.barrelGetMaxItemCount( te );
|
||||
int newTotal = (int) storedItemCount() + (int) input.getStackSize();
|
||||
if ( newTotal > max )
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
fProxy.barrelSetCount( te, max );
|
||||
IAEItemStack result = input.copy();
|
||||
result.setStackSize( newTotal - max );
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
fProxy.barrelSetCount( te, newTotal );
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEItemStack extractItems(IAEItemStack request, Actionable mode, BaseActionSource src)
|
||||
{
|
||||
if ( containsItemType( request, false ) )
|
||||
{
|
||||
int howMany = (int) storedItemCount();
|
||||
if ( request.getStackSize() >= howMany )
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
{
|
||||
fProxy.setItemType( te, null );
|
||||
fProxy.barrelSetCount( te, 0 );
|
||||
}
|
||||
|
||||
IAEItemStack r = request.copy();
|
||||
r.setStackSize( howMany );
|
||||
return r;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
fProxy.barrelSetCount( te, (int) (howMany - request.getStackSize()) );
|
||||
return request.copy();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemList<IAEItemStack> getAvailableItems(IItemList out)
|
||||
{
|
||||
ItemStack i = fProxy.barrelGetItem( te );
|
||||
if ( i != null )
|
||||
{
|
||||
i.stackSize = fProxy.barrelGetItemCount( te );
|
||||
out.addStorage( AEItemStack.create( i ) );
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.IExternalStorageHandler;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.integration.modules.FZ;
|
||||
import appeng.me.storage.MEMonitorIInventory;
|
||||
import appeng.util.inv.IMEAdaptor;
|
||||
|
||||
public class FactorizationHandler implements IExternalStorageHandler
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource mySrc)
|
||||
{
|
||||
return chan == StorageChannel.ITEMS && FZ.instance.isBarrel( te );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource src)
|
||||
{
|
||||
if ( chan == StorageChannel.ITEMS )
|
||||
return new MEMonitorIInventory( new IMEAdaptor( FZ.instance.getFactorizationBarrel( te ), src ) );
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
public class MFRDSU implements IMEInventory<IAEItemStack>
|
||||
{
|
||||
|
||||
IDeepStorageUnit dsu;
|
||||
TileEntity te;
|
||||
|
||||
public MFRDSU(TileEntity ta) {
|
||||
te = ta;
|
||||
dsu = (IDeepStorageUnit) ta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StorageChannel getChannel()
|
||||
{
|
||||
return StorageChannel.ITEMS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEItemStack injectItems(IAEItemStack input, Actionable mode, BaseActionSource src)
|
||||
{
|
||||
ItemStack is = dsu.getStoredItemType();
|
||||
if ( is != null )
|
||||
{
|
||||
if ( input.equals( is ) )
|
||||
{
|
||||
long max = dsu.getMaxStoredCount();
|
||||
long storedItems = is.stackSize;
|
||||
if ( max == storedItems )
|
||||
return input;
|
||||
|
||||
storedItems += input.getStackSize();
|
||||
if ( storedItems > max )
|
||||
{
|
||||
IAEItemStack overflow = AEItemStack.create( is );
|
||||
overflow.setStackSize( (int) (storedItems - max) );
|
||||
if ( mode == Actionable.MODULATE )
|
||||
dsu.setStoredItemCount( (int) max );
|
||||
return overflow;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
dsu.setStoredItemCount( is.stackSize + (int) input.getStackSize() );
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( input.getTagCompound() != null )
|
||||
return input;
|
||||
if ( mode == Actionable.MODULATE )
|
||||
dsu.setStoredItemType( input.getItemStack(), (int) input.getStackSize() );
|
||||
return null;
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEItemStack extractItems(IAEItemStack request, Actionable mode, BaseActionSource src)
|
||||
{
|
||||
ItemStack is = dsu.getStoredItemType();
|
||||
if ( request.equals( is ) )
|
||||
{
|
||||
if ( request.getStackSize() >= is.stackSize )
|
||||
{
|
||||
is = is.copy();
|
||||
if ( mode == Actionable.MODULATE )
|
||||
dsu.setStoredItemCount( 0 );
|
||||
return AEItemStack.create( is );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
dsu.setStoredItemCount( is.stackSize - (int) request.getStackSize() );
|
||||
return request.copy();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemList<IAEItemStack> getAvailableItems(IItemList<IAEItemStack> out)
|
||||
{
|
||||
ItemStack is = dsu.getStoredItemType();
|
||||
if ( is != null )
|
||||
{
|
||||
out.add( AEItemStack.create( is ) );
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.IExternalStorageHandler;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.integration.modules.DSU;
|
||||
import appeng.me.storage.MEMonitorIInventory;
|
||||
import appeng.util.inv.IMEAdaptor;
|
||||
|
||||
public class MFRDSUHandler implements IExternalStorageHandler
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource mySrc)
|
||||
{
|
||||
return chan == StorageChannel.ITEMS && DSU.instance.isDSU( te );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource src)
|
||||
{
|
||||
if ( chan == StorageChannel.ITEMS )
|
||||
return new MEMonitorIInventory( new IMEAdaptor( DSU.instance.getDSU( te ), src ) );
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
|
||||
public class MJBattery
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import appeng.integration.abstraction.helpers.BaseMJperdition;
|
||||
import buildcraft.api.power.IPowerReceptor;
|
||||
import buildcraft.api.power.PowerHandler;
|
||||
import buildcraft.api.power.PowerHandler.PowerReceiver;
|
||||
import buildcraft.api.power.PowerHandler.Type;
|
||||
|
||||
public class MJPerdition extends BaseMJperdition
|
||||
{
|
||||
|
||||
final protected PowerHandler bcPowerHandler;
|
||||
|
||||
public MJPerdition(IPowerReceptor te) {
|
||||
bcPowerHandler = new PowerHandler( te, Type.MACHINE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Tick()
|
||||
{
|
||||
bcPowerHandler.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound data)
|
||||
{
|
||||
bcPowerHandler.writeToNBT( data, "bcPowerHandler" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound data)
|
||||
{
|
||||
bcPowerHandler.readFromNBT( data, "bcPowerHandler" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public PowerReceiver getPowerReceiver()
|
||||
{
|
||||
return bcPowerHandler.getPowerReceiver();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double useEnergy(double min, double max, boolean doUse)
|
||||
{
|
||||
return bcPowerHandler.useEnergy( min, max, doUse );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addEnergy(float failed)
|
||||
{
|
||||
bcPowerHandler.addEnergy( failed );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configure(int i, int j, float f, int k)
|
||||
{
|
||||
bcPowerHandler.configure( i, j, f, k );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import cofh.api.energy.IEnergyHandler;
|
||||
|
||||
public class NullRFHandler implements IEnergyHandler
|
||||
{
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyStored(ForgeDirection from)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyStored(ForgeDirection from)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectEnergy(ForgeDirection from)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user