diff --git a/src/main/java/appeng/integration/IntegrationNode.java b/src/main/java/appeng/integration/IntegrationNode.java index aca23201..c929fb39 100644 --- a/src/main/java/appeng/integration/IntegrationNode.java +++ b/src/main/java/appeng/integration/IntegrationNode.java @@ -94,12 +94,13 @@ final class IntegrationNode if( enabled ) { - switch (type) { + switch( type ) + { case IC2: - this.mod = Integrations.ic2 = new IC2Module(); + this.mod = Integrations.setIc2( new IC2Module() ); break; case JEI: - this.mod = Integrations.jei = new JEIModule(); + this.mod = Integrations.setJei( new JEIModule() ); break; case Waila: this.mod = new WailaModule(); diff --git a/src/main/java/appeng/integration/Integrations.java b/src/main/java/appeng/integration/Integrations.java index 9a070ec0..871b4cb0 100644 --- a/src/main/java/appeng/integration/Integrations.java +++ b/src/main/java/appeng/integration/Integrations.java @@ -26,6 +26,9 @@ import appeng.integration.abstraction.IMekanism; import appeng.integration.abstraction.IRC; +/** + * Provides convenient access to various integrations with other mods. + */ public final class Integrations { @@ -67,4 +70,35 @@ public final class Integrations { return invTweaks; } + + static IIC2 setIc2( IIC2 ic2 ) + { + Integrations.ic2 = ic2; + return ic2; + } + + static IJEI setJei( IJEI jei ) + { + Integrations.jei = jei; + return jei; + } + + static IRC setRc( IRC rc ) + { + Integrations.rc = rc; + return rc; + } + + static IMekanism setMekanism( IMekanism mekanism ) + { + Integrations.mekanism = mekanism; + return mekanism; + } + + static IInvTweaks setInvTweaks( IInvTweaks invTweaks ) + { + Integrations.invTweaks = invTweaks; + return invTweaks; + } + } diff --git a/src/main/java/appeng/parts/PartPlacement.java b/src/main/java/appeng/parts/PartPlacement.java index f93bbc1b..cbcd6225 100644 --- a/src/main/java/appeng/parts/PartPlacement.java +++ b/src/main/java/appeng/parts/PartPlacement.java @@ -297,11 +297,8 @@ public class PartPlacement te_pos = pos.offset( side ); final Block blkID = world.getBlockState( te_pos ).getBlock(); - tile = world.getTileEntity( te_pos ); - if( ( blkID == null || blkID.isReplaceable( world, te_pos ) || host != null ) ) // /&& side != - // AEPartLocation.INTERNAL - // ) + if( blkID == null || blkID.isReplaceable( world, te_pos ) || host != null ) { return place( held, te_pos, side.getOpposite(), player, hand, world, pass == PlaceType.INTERACT_FIRST_PASS ? PlaceType.INTERACT_SECOND_PASS : PlaceType.PLACE_ITEM, depth + 1 ); }