Mekanism-tilera-Edition/common/buildcraft/api/gates/ITrigger.java

48 lines
1.1 KiB
Java
Raw Normal View History

2013-04-13 16:35:13 +02:00
package buildcraft.api.gates;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraftforge.common.ForgeDirection;
2013-04-13 16:35:13 +02:00
public interface ITrigger {
/**
* Return your ID from the old API here, this is only used to convert old
* saves to the new format.
*/
int getLegacyId();
String getUniqueTag();
2013-04-13 16:35:13 +02:00
@SideOnly(Side.CLIENT)
Icon getIcon();
@SideOnly(Side.CLIENT)
void registerIcons(IconRegister iconRegister);
2013-04-13 16:35:13 +02:00
/**
* Return true if this trigger can accept parameters
*/
boolean hasParameter();
2013-04-13 16:35:13 +02:00
/**
* Return the trigger description in the UI
*/
String getDescription();
2013-04-13 16:35:13 +02:00
/**
* Return true if the tile given in parameter activates the trigger, given
* the parameters.
2013-04-13 16:35:13 +02:00
*/
boolean isTriggerActive(ForgeDirection side, TileEntity tile, ITriggerParameter parameter);
2013-04-13 16:35:13 +02:00
/**
* Create parameters for the trigger. As for now, there is only one kind of
* trigger parameter available so this subprogram is final.
2013-04-13 16:35:13 +02:00
*/
ITriggerParameter createParameter();
2013-04-13 16:35:13 +02:00
}