Mekanism-tilera-Edition/common/buildcraft/api/power/IPowerReceptor.java

47 lines
1.4 KiB
Java
Raw Normal View History

2013-08-08 19:10:11 +02:00
/**
* Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License
* 1.0, or MMPL. Please check the contents of the license located in
2013-04-13 16:35:13 +02:00
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.api.power;
2013-08-08 19:10:11 +02:00
import net.minecraft.world.World;
2013-04-13 16:35:13 +02:00
import net.minecraftforge.common.ForgeDirection;
2013-12-01 07:41:01 +01:00
import buildcraft.api.power.PowerHandler.PowerReceiver;
2013-04-13 16:35:13 +02:00
2013-08-08 19:10:11 +02:00
/**
2013-12-01 07:41:01 +01:00
* This interface should be implemented by any Tile Entity that wishes to be able to receive power.
*
2013-08-08 19:10:11 +02:00
* @author CovertJaguar <http://www.railcraft.info/>
*/
2013-12-01 07:41:01 +01:00
public interface IPowerReceptor
{
2013-04-13 16:35:13 +02:00
2013-08-08 19:10:11 +02:00
/**
2013-12-01 07:41:01 +01:00
* Get the PowerReceiver for this side of the block. You can return the same PowerReceiver for
* all sides or one for each side.
*
* You should NOT return null to this method unless you mean to NEVER receive power from that
* side. Returning null, after previous returning a PowerReceiver, will most likely cause pipe
* connections to derp out and engines to eventually explode.
*
2013-08-08 19:10:11 +02:00
* @param side
* @return
*/
public PowerReceiver getPowerReceiver(ForgeDirection side);
/**
2013-12-01 07:41:01 +01:00
* Call back from the PowerHandler that is called when the stored power exceeds the activation
* power.
*
2013-08-08 19:10:11 +02:00
* It can be triggered by update() calls or power modification calls.
2013-12-01 07:41:01 +01:00
*
2013-08-08 19:10:11 +02:00
* @param workProvider
*/
public void doWork(PowerHandler workProvider);
public World getWorld();
2013-04-13 16:35:13 +02:00
}