First iteration of making integrations typesafe

This commit is contained in:
yueh
2015-08-06 16:01:56 +02:00
parent 0df445c6a8
commit f303c17ae0
44 changed files with 282 additions and 147 deletions
@@ -28,6 +28,7 @@ import Reika.RotaryCraft.API.Interfaces.Transducerable;
import Reika.RotaryCraft.API.Power.AdvancedShaftPowerReceiver;
import appeng.api.config.PowerUnits;
import appeng.integration.IntegrationType;
import appeng.tile.TileEvent;
import appeng.tile.events.TileEventType;
import appeng.transformer.annotations.Integration.Interface;
@@ -35,7 +36,7 @@ import appeng.transformer.annotations.Integration.InterfaceList;
import appeng.transformer.annotations.Integration.Method;
@InterfaceList( value = { @Interface( iname = "RotaryCraft", iface = "Reika.RotaryCraft.API.Power.AdvancedShaftPowerReceiver" ), @Interface( iname = "RotaryCraft", iface = "Reika.RotaryCraft.API.Interfaces.Transducerable" ) } )
@InterfaceList( value = { @Interface( iname = IntegrationType.RotaryCraft, iface = "Reika.RotaryCraft.API.Power.AdvancedShaftPowerReceiver" ), @Interface( iname = IntegrationType.RotaryCraft, iface = "Reika.RotaryCraft.API.Interfaces.Transducerable" ) } )
public abstract class RotaryCraft extends IC2 implements AdvancedShaftPowerReceiver, Transducerable
{
@@ -47,7 +48,7 @@ public abstract class RotaryCraft extends IC2 implements AdvancedShaftPowerRecei
private long currentPower = 0;
@TileEvent( TileEventType.TICK )
@Method( iname = "RotaryCraft" )
@Method( iname = IntegrationType.RotaryCraft )
public void Tick_RotaryCraft()
{
if( this.worldObj != null && !this.worldObj.isRemote && this.currentPower > 0 )