Format sourcecode

This commit is contained in:
yueh
2017-07-20 21:17:10 +02:00
parent 66437897be
commit 621910df91
295 changed files with 2142 additions and 1562 deletions
@@ -79,7 +79,8 @@ final class IntegrationNode
final ModAPIManager apiManager = ModAPIManager.INSTANCE;
boolean enabled = this.modID == null || Loader.isModLoaded( this.modID ) || apiManager.hasAPI( this.modID );
AEConfig.instance().addCustomCategoryComment( "ModIntegration", "Valid Values are 'AUTO', 'ON', or 'OFF' - defaults to 'AUTO' ; Suggested that you leave this alone unless your experiencing an issue, or wish to disable the integration for a reason." );
AEConfig.instance().addCustomCategoryComment( "ModIntegration",
"Valid Values are 'AUTO', 'ON', or 'OFF' - defaults to 'AUTO' ; Suggested that you leave this alone unless your experiencing an issue, or wish to disable the integration for a reason." );
final String mode = AEConfig.instance().get( "ModIntegration", this.displayName.replace( " ", "" ), "AUTO" ).getString();
if( mode.toUpperCase().equals( "ON" ) )
@@ -22,8 +22,11 @@ package appeng.integration;
enum IntegrationStage
{
PRE_INIT, INIT, POST_INIT,
PRE_INIT,
INIT,
POST_INIT,
FAILED, READY
FAILED,
READY
}
@@ -37,7 +37,8 @@ public interface IIC2 extends IIntegrationModule
/**
* Create an IC2 power sink for the given external sink.
*/
default IC2PowerSink createPowerSink( TileEntity tileEntity, IExternalPowerSink externalSink ) {
default IC2PowerSink createPowerSink( TileEntity tileEntity, IExternalPowerSink externalSink )
{
return IC2PowerSinkStub.INSTANCE;
}
@@ -27,10 +27,12 @@ import appeng.integration.IIntegrationModule;
public interface IRC extends IIntegrationModule
{
default void rockCrusher( ItemStack input, ItemStack output ) {
default void rockCrusher( ItemStack input, ItemStack output )
{
}
class Stub extends IIntegrationModule.Stub implements IRC {
class Stub extends IIntegrationModule.Stub implements IRC
{
}
}
@@ -18,15 +18,17 @@
package appeng.integration.abstraction;
import appeng.integration.IIntegrationModule;
/**
* @author GuntherDW
*/
public interface IRF
{
class Stub extends IIntegrationModule.Stub implements IRF
{
class Stub extends IIntegrationModule.Stub implements IRF
{
}
}
}
@@ -18,6 +18,7 @@
package appeng.integration.modules.ic2;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@@ -18,6 +18,7 @@
package appeng.integration.modules.ic2;
import ic2.api.recipe.IRecipeInput;
import net.minecraft.item.ItemStack;
@@ -25,37 +26,39 @@ import javax.annotation.Nonnull;
import java.util.Collections;
import java.util.List;
/**
* Implementation of IRecipeInput for the macerator recipe.
*
* @author GuntherDW
*/
public class IC2RecipeInput implements IRecipeInput
{
@Nonnull
private final ItemStack itemstack;
private final int amount;
@Nonnull
private final ItemStack itemstack;
private final int amount;
public IC2RecipeInput( ItemStack in, int amount )
{
this.itemstack = in;
this.amount = amount;
}
public IC2RecipeInput( ItemStack in, int amount )
{
this.itemstack = in;
this.amount = amount;
}
@Override
public boolean matches( ItemStack itemStack )
{
return this.itemstack.isItemEqual( itemStack );
}
@Override
public boolean matches( ItemStack itemStack )
{
return this.itemstack.isItemEqual( itemStack );
}
@Override
public int getAmount()
{
return this.amount;
}
@Override
public int getAmount()
{
return this.amount;
}
@Override
public List<ItemStack> getInputs()
{
return Collections.unmodifiableList( Collections.singletonList( itemstack ) );
}
@Override
public List<ItemStack> getInputs()
{
return Collections.unmodifiableList( Collections.singletonList( itemstack ) );
}
}
@@ -93,7 +93,8 @@ class CondenserCategory extends BlankRecipeCategory<CondenserOutputWrapper>
* @since JEI 4.5.0
*/
@Override
public String getModName() {
public String getModName()
{
return AppEng.MOD_NAME;
}
@@ -50,7 +50,10 @@ class GrinderRecipeCategory extends BlankRecipeCategory<GrinderRecipeWrapper>
}
@Override
public String getModName() { return AppEng.MOD_NAME; }
public String getModName()
{
return AppEng.MOD_NAME;
}
@Override
public String getUid()
@@ -80,7 +80,8 @@ class InscriberRecipeCategory extends BlankRecipeCategory<InscriberRecipeWrapper
* @since JEI 4.5.0
*/
@Override
public String getModName() {
public String getModName()
{
return AppEng.MOD_NAME;
}
@@ -53,4 +53,3 @@ class InscriberRecipeWrapper extends BlankRecipeWrapper
ingredients.setOutput( ItemStack.class, recipe.getOutput() );
}
}
@@ -199,7 +199,7 @@ public class JEIPlugin extends BlankModPlugin
@Override
public void onRuntimeAvailable( IJeiRuntime jeiRuntime )
{
//JEIModule jeiModule = (JEIModule) Integrations.jei();
//jeiModule.setJei( new JeiRuntimeAdapter( jeiRuntime ) );
// JEIModule jeiModule = (JEIModule) Integrations.jei();
// jeiModule.setJei( new JeiRuntimeAdapter( jeiRuntime ) );
}
}
@@ -18,21 +18,22 @@
package appeng.integration.modules.rf;
import appeng.integration.IIntegrationModule;
import appeng.integration.IntegrationHelper;
/**
* @author GuntherDW
*/
public class RFModule implements IIntegrationModule
{
public RFModule()
{
IntegrationHelper.testClassExistence( this, cofh.redstoneflux.api.IEnergyContainerItem.class );
IntegrationHelper.testClassExistence( this, cofh.redstoneflux.api.IEnergyProvider.class );
IntegrationHelper.testClassExistence( this, cofh.redstoneflux.api.IEnergyConnection.class );
IntegrationHelper.testClassExistence( this, cofh.redstoneflux.api.IEnergyContainerItem.class );
}
public RFModule()
{
IntegrationHelper.testClassExistence( this, cofh.redstoneflux.api.IEnergyContainerItem.class );
IntegrationHelper.testClassExistence( this, cofh.redstoneflux.api.IEnergyProvider.class );
IntegrationHelper.testClassExistence( this, cofh.redstoneflux.api.IEnergyConnection.class );
IntegrationHelper.testClassExistence( this, cofh.redstoneflux.api.IEnergyContainerItem.class );
}
}
@@ -30,13 +30,14 @@ import mcjty.theoneprobe.api.ProbeMode;
import appeng.tile.AEBaseTile;
/**
* Similar to {@link IProbeInfoProvider}, but already providing the {@link AEBaseTile} being looked at.
*
*/
public interface ITileProbInfoProvider
{
/**
* @see IProbeInfoProvider#addProbeInfo(ProbeMode, IProbeInfo, EntityPlayer, World, IBlockState, IProbeHitData)
*/
@@ -91,7 +91,6 @@ public final class PartWailaDataProvider implements IWailaDataProvider
final TileEntity te = accessor.getTileEntity();
final RayTraceResult mop = accessor.getMOP();
final Optional<IPart> maybePart = this.accessor.getMaybePart( te, mop );
if( maybePart.isPresent() )
@@ -107,7 +107,7 @@ public final class TileWailaDataProvider implements IWailaDataProvider
}
@Override
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos)
public NBTTagCompound getNBTData( EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos )
{
for( final IWailaDataProvider provider : this.providers )
{
@@ -73,7 +73,8 @@ public final class ChargerWailaDataProvider extends BaseWailaDataProvider
final EntityPlayer player = accessor.getPlayer();
currentToolTip.add( WailaText.Contains + ": " + currentInventory );
ITooltipFlag.TooltipFlags tooltipFlag = Minecraft.getMinecraft().gameSettings.advancedItemTooltips ? ITooltipFlag.TooltipFlags.ADVANCED : ITooltipFlag.TooltipFlags.NORMAL;
ITooltipFlag.TooltipFlags tooltipFlag = Minecraft
.getMinecraft().gameSettings.advancedItemTooltips ? ITooltipFlag.TooltipFlags.ADVANCED : ITooltipFlag.TooltipFlags.NORMAL;
chargingItem.getItem().addInformation( chargingItem, player.world, currentToolTip, tooltipFlag );
}
}