From 0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Mon, 30 Jan 2023 10:56:42 -0800 Subject: [ci skip] spotlessApply with the new settings --- .../gregtech/api/interfaces/IBlockContainer.java | 1 + .../gregtech/api/interfaces/IBlockOnWalkOver.java | 1 + .../java/gregtech/api/interfaces/IChunkLoader.java | 1 + .../api/interfaces/IColorModulationContainer.java | 1 + .../java/gregtech/api/interfaces/ICondition.java | 8 + .../interfaces/IConfigurationCircuitSupport.java | 9 +- .../gregtech/api/interfaces/IDamagableItem.java | 1 + .../gregtech/api/interfaces/IDebugableBlock.java | 12 +- .../java/gregtech/api/interfaces/IDescribable.java | 1 + .../api/interfaces/IDragAndDropSupport.java | 32 +- .../java/gregtech/api/interfaces/IFoodStat.java | 4 +- .../api/interfaces/IGlobalWirelessEnergy.java | 4 +- .../java/gregtech/api/interfaces/IGuiIcon.java | 1 + .../java/gregtech/api/interfaces/IGuiScreen.java | 4 +- .../api/interfaces/IHasFluidDisplayItem.java | 1 + .../api/interfaces/IHasIndexedTexture.java | 2 + .../gregtech/api/interfaces/IHatchElement.java | 63 +- .../java/gregtech/api/interfaces/IHeatingCoil.java | 4 +- .../gregtech/api/interfaces/IIconContainer.java | 9 +- .../gregtech/api/interfaces/IItemBehaviour.java | 45 +- .../gregtech/api/interfaces/IItemContainer.java | 1 + .../gregtech/api/interfaces/IMaterialHandler.java | 1 + .../api/interfaces/INetworkUpdatableItem.java | 14 +- .../api/interfaces/IOreRecipeRegistrator.java | 7 +- .../gregtech/api/interfaces/IProjectileItem.java | 14 +- .../api/interfaces/IRedstoneCircuitBlock.java | 10 +- .../api/interfaces/ISecondaryDescribable.java | 1 + .../gregtech/api/interfaces/ISubTagContainer.java | 1 + .../java/gregtech/api/interfaces/ITexture.java | 9 +- .../gregtech/api/interfaces/ITextureBuilder.java | 26 +- .../java/gregtech/api/interfaces/IToolStats.java | 40 +- .../api/interfaces/covers/IControlsWorkCover.java | 4 +- .../api/interfaces/fluid/IGT_FluidBuilder.java | 9 +- .../api/interfaces/fluid/IGT_RegisteredFluid.java | 18 +- .../api/interfaces/internal/IBCTileEntity.java | 2 +- .../interfaces/internal/IGT_CraftingRecipe.java | 1 + .../gregtech/api/interfaces/internal/IGT_Mod.java | 10 +- .../api/interfaces/internal/IGT_RecipeAdder.java | 1027 ++++++-------------- .../api/interfaces/internal/IIC2TileEntity.java | 3 +- .../api/interfaces/internal/IThaumcraftCompat.java | 66 +- .../api/interfaces/internal/IUETileEntity.java | 2 +- .../interfaces/metatileentity/IConnectable.java | 5 +- .../interfaces/metatileentity/IFluidLockable.java | 6 +- .../metatileentity/IMachineCallback.java | 1 + .../interfaces/metatileentity/IMetaTileEntity.java | 171 ++-- .../metatileentity/IMetaTileEntityCable.java | 6 +- .../metatileentity/IMetaTileEntityItemPipe.java | 38 +- .../api/interfaces/modularui/IAddGregtechLogo.java | 1 + .../interfaces/modularui/IAddInventorySlots.java | 1 + .../api/interfaces/modularui/IAddUIWidgets.java | 1 + .../interfaces/modularui/IGetGUITextureSet.java | 1 + .../api/interfaces/modularui/IGetTitleColor.java | 1 + .../tileentity/IBasicEnergyContainer.java | 20 +- .../interfaces/tileentity/IColoredTileEntity.java | 5 +- .../api/interfaces/tileentity/ICoverable.java | 22 +- .../tileentity/IDebugableTileEntity.java | 9 +- .../api/interfaces/tileentity/IDigitalChest.java | 14 +- .../interfaces/tileentity/IEnergyConductor.java | 1 + .../interfaces/tileentity/IEnergyConnected.java | 27 +- .../tileentity/IExperimentalEnergyTileEntity.java | 55 +- .../api/interfaces/tileentity/IFibreConnected.java | 1 + .../tileentity/IGearEnergyTileEntity.java | 9 +- .../tileentity/IGregTechDeviceInformation.java | 11 +- .../interfaces/tileentity/IGregTechTileEntity.java | 60 +- .../tileentity/IGregtechWailaProvider.java | 17 +- .../api/interfaces/tileentity/IHasInventory.java | 14 +- .../tileentity/IHasWorldObjectAndCoords.java | 16 +- .../api/interfaces/tileentity/IIC2Enet.java | 1 + .../tileentity/IMachineBlockUpdateable.java | 11 +- .../interfaces/tileentity/IMachineProgress.java | 14 +- .../tileentity/IPipeRenderedTileEntity.java | 1 + .../interfaces/tileentity/IRedstoneEmitter.java | 11 +- .../interfaces/tileentity/IRedstoneReceiver.java | 6 +- .../interfaces/tileentity/IRedstoneTileEntity.java | 4 +- .../interfaces/tileentity/ITexturedTileEntity.java | 4 +- .../api/interfaces/tileentity/ITurnable.java | 1 + .../interfaces/tileentity/IUpgradableMachine.java | 1 + 77 files changed, 813 insertions(+), 1224 deletions(-) (limited to 'src/main/java/gregtech/api/interfaces') diff --git a/src/main/java/gregtech/api/interfaces/IBlockContainer.java b/src/main/java/gregtech/api/interfaces/IBlockContainer.java index 89bda5de12..5a80655a5c 100644 --- a/src/main/java/gregtech/api/interfaces/IBlockContainer.java +++ b/src/main/java/gregtech/api/interfaces/IBlockContainer.java @@ -3,6 +3,7 @@ package gregtech.api.interfaces; import net.minecraft.block.Block; public interface IBlockContainer { + Block getBlock(); byte getMeta(); diff --git a/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java b/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java index 50f6cce5d9..0c8fce931b 100644 --- a/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java +++ b/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java @@ -4,5 +4,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.world.World; public interface IBlockOnWalkOver { + void onWalkOver(EntityLivingBase aEntity, World aWorld, int aX, int aY, int aZ); } diff --git a/src/main/java/gregtech/api/interfaces/IChunkLoader.java b/src/main/java/gregtech/api/interfaces/IChunkLoader.java index adba5e721e..b597d6a71f 100644 --- a/src/main/java/gregtech/api/interfaces/IChunkLoader.java +++ b/src/main/java/gregtech/api/interfaces/IChunkLoader.java @@ -4,6 +4,7 @@ import net.minecraft.world.ChunkCoordIntPair; // This interface is implemented by the machines that actively load a working chunk public interface IChunkLoader { + // return a working chunk coordinates, may be null ChunkCoordIntPair getActiveChunk(); } diff --git a/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java b/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java index d3c312e610..55053e1d12 100644 --- a/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java +++ b/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java @@ -1,5 +1,6 @@ package gregtech.api.interfaces; public interface IColorModulationContainer { + short[] getRGBA(); } diff --git a/src/main/java/gregtech/api/interfaces/ICondition.java b/src/main/java/gregtech/api/interfaces/ICondition.java index b29b960650..554cd2df77 100644 --- a/src/main/java/gregtech/api/interfaces/ICondition.java +++ b/src/main/java/gregtech/api/interfaces/ICondition.java @@ -1,11 +1,13 @@ package gregtech.api.interfaces; public interface ICondition { + boolean isTrue(O aObject); // Utility Classes for adding relations between Conditions. class Not implements ICondition { + private final ICondition mCondition; public Not(ICondition aCondition) { @@ -19,6 +21,7 @@ public interface ICondition { } class Or implements ICondition { + private final ICondition[] mConditions; public Or(ICondition... aConditions) { @@ -33,6 +36,7 @@ public interface ICondition { } class Nor implements ICondition { + private final ICondition[] mConditions; public Nor(ICondition... aConditions) { @@ -47,6 +51,7 @@ public interface ICondition { } class And implements ICondition { + private final ICondition[] mConditions; public And(ICondition... aConditions) { @@ -61,6 +66,7 @@ public interface ICondition { } class Nand implements ICondition { + private final ICondition[] mConditions; public Nand(ICondition... aConditions) { @@ -75,6 +81,7 @@ public interface ICondition { } class Xor implements ICondition { + private final ICondition mCondition1, mCondition2; public Xor(ICondition aCondition1, ICondition aCondition2) { @@ -89,6 +96,7 @@ public interface ICondition { } class Equal implements ICondition { + private final ICondition mCondition1, mCondition2; public Equal(ICondition aCondition1, ICondition aCondition2) { diff --git a/src/main/java/gregtech/api/interfaces/IConfigurationCircuitSupport.java b/src/main/java/gregtech/api/interfaces/IConfigurationCircuitSupport.java index b2d32b2fc4..6ec9f68a8b 100644 --- a/src/main/java/gregtech/api/interfaces/IConfigurationCircuitSupport.java +++ b/src/main/java/gregtech/api/interfaces/IConfigurationCircuitSupport.java @@ -1,14 +1,17 @@ package gregtech.api.interfaces; -import gregtech.api.GregTech_API; import java.util.List; + import net.minecraft.item.ItemStack; +import gregtech.api.GregTech_API; + /** - * Implement this interface if your tileentity (or metatileentity) supports configuration circuits - * to resolve recipe conflicts. + * Implement this interface if your tileentity (or metatileentity) supports configuration circuits to resolve recipe + * conflicts. */ public interface IConfigurationCircuitSupport { + /** * * @return Integrated circuit slot index in the machine inventory diff --git a/src/main/java/gregtech/api/interfaces/IDamagableItem.java b/src/main/java/gregtech/api/interfaces/IDamagableItem.java index b360556aa3..5f0d53b577 100644 --- a/src/main/java/gregtech/api/interfaces/IDamagableItem.java +++ b/src/main/java/gregtech/api/interfaces/IDamagableItem.java @@ -3,5 +3,6 @@ package gregtech.api.interfaces; import net.minecraft.item.ItemStack; public interface IDamagableItem { + boolean doDamageToItem(ItemStack aStack, int aVanillaDamage); } diff --git a/src/main/java/gregtech/api/interfaces/IDebugableBlock.java b/src/main/java/gregtech/api/interfaces/IDebugableBlock.java index 063f713fe4..9c6ab660bd 100644 --- a/src/main/java/gregtech/api/interfaces/IDebugableBlock.java +++ b/src/main/java/gregtech/api/interfaces/IDebugableBlock.java @@ -1,25 +1,23 @@ package gregtech.api.interfaces; import java.util.ArrayList; + import net.minecraft.entity.player.EntityPlayer; /** * You are allowed to include this File in your Download, as i will not change it. */ public interface IDebugableBlock { + /** - * Returns a Debug Message, for a generic DebugItem - * Blocks have to implement this interface NOT TileEntities! + * Returns a Debug Message, for a generic DebugItem Blocks have to implement this interface NOT TileEntities! * * @param aPlayer the Player, who rightclicked with his Debug Item * @param aX Block-Coordinate * @param aY Block-Coordinate * @param aZ Block-Coordinate - * @param aLogLevel the Log Level of the Debug Item. - * 0 = Obvious - * 1 = Visible for the regular Scanner - * 2 = Only visible to more advanced Scanners - * 3 = Debug ONLY + * @param aLogLevel the Log Level of the Debug Item. 0 = Obvious 1 = Visible for the regular Scanner 2 = Only + * visible to more advanced Scanners 3 = Debug ONLY * @return a String-Array containing the DebugInfo, every Index is a separate line (0 = first Line) */ ArrayList getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel); diff --git a/src/main/java/gregtech/api/interfaces/IDescribable.java b/src/main/java/gregtech/api/interfaces/IDescribable.java index 3e72f587db..21bb520482 100644 --- a/src/main/java/gregtech/api/interfaces/IDescribable.java +++ b/src/main/java/gregtech/api/interfaces/IDescribable.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces; * To get simple things like a ToolTip Description */ public interface IDescribable { + /** * The Tooltip Text */ diff --git a/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java b/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java index 53b3a2b059..3527b2e60d 100644 --- a/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java +++ b/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java @@ -1,14 +1,16 @@ package gregtech.api.interfaces; +import java.util.Collections; +import java.util.List; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.item.ItemStack; + import codechicken.nei.NEIClientUtils; import codechicken.nei.VisiblityData; import codechicken.nei.api.INEIGuiHandler; import codechicken.nei.api.TaggedInventoryArea; import cpw.mods.fml.common.Optional; -import java.util.Collections; -import java.util.List; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.item.ItemStack; /** * Implement this interface if your GuiContainer supports Drag-And-Drop behavior on NEI. @@ -17,19 +19,21 @@ import net.minecraft.item.ItemStack; public interface IDragAndDropSupport extends INEIGuiHandler { /** - * Implement this to handle Drag-And-Drop behavior. - * This may be invoked on normal click too ({@code isGhost==false}), so be careful - * if your slot supports both Drag-And-Drop and other behaviors e.g. fluid I/O with FluidDisplay click - * @param gui Current gui instance. Make sure to check if it is an instance of your GuiContainer. - * @param mousex X position of the mouse - * @param mousey Y position of the mouse + * Implement this to handle Drag-And-Drop behavior. This may be invoked on normal click too + * ({@code isGhost==false}), so be careful if your slot supports both Drag-And-Drop and other behaviors e.g. fluid + * I/O with FluidDisplay click + * + * @param gui Current gui instance. Make sure to check if it is an instance of your GuiContainer. + * @param mousex X position of the mouse + * @param mousey Y position of the mouse * @param draggedStack ItemStack user is holding on cursor - * @param button 0 = left click, 1 = right click - * @param isGhost Whether {@code draggedStack} is dragged from ItemPanel/BookmarkPanel, or actual item player holds + * @param button 0 = left click, 1 = right click + * @param isGhost Whether {@code draggedStack} is dragged from ItemPanel/BookmarkPanel, or actual item player + * holds * @return True if success */ - boolean handleDragAndDropGT( - GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button, boolean isGhost); + boolean handleDragAndDropGT(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button, + boolean isGhost); default boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button) { return handleDragAndDropGT(gui, mousex, mousey, draggedStack, button, NEIClientUtils.getHeldItem() == null); diff --git a/src/main/java/gregtech/api/interfaces/IFoodStat.java b/src/main/java/gregtech/api/interfaces/IFoodStat.java index 4f4c696e12..c768c5ca1c 100644 --- a/src/main/java/gregtech/api/interfaces/IFoodStat.java +++ b/src/main/java/gregtech/api/interfaces/IFoodStat.java @@ -1,11 +1,13 @@ package gregtech.api.interfaces; -import gregtech.api.items.GT_MetaBase_Item; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; import net.minecraft.item.ItemStack; +import gregtech.api.items.GT_MetaBase_Item; + public interface IFoodStat { + /** * Warning the "aPlayer" Parameter may be null! */ diff --git a/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java b/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java index 91ada956bf..29b32b5d3b 100644 --- a/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java +++ b/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java @@ -2,11 +2,13 @@ package gregtech.api.interfaces; import static gregtech.common.misc.GlobalVariableStorage.*; -import gregtech.common.misc.GlobalEnergyWorldSavedData; import java.math.BigInteger; import java.util.UUID; + import net.minecraft.entity.player.EntityPlayer; +import gregtech.common.misc.GlobalEnergyWorldSavedData; + // If you are adding very late-game content feel free to tap into this interface. // The eventual goal is to bypass laser/dynamo stuff and have energy deposited directly from ultra-endgame // multi-blocks directly into the users network. diff --git a/src/main/java/gregtech/api/interfaces/IGuiIcon.java b/src/main/java/gregtech/api/interfaces/IGuiIcon.java index 3204c35b4e..0bc7408250 100644 --- a/src/main/java/gregtech/api/interfaces/IGuiIcon.java +++ b/src/main/java/gregtech/api/interfaces/IGuiIcon.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces; * To allow addons to make use of GT_GuiIcon */ public interface IGuiIcon { + int getX(); int getY(); diff --git a/src/main/java/gregtech/api/interfaces/IGuiScreen.java b/src/main/java/gregtech/api/interfaces/IGuiScreen.java index 2f12781a77..c33838fc7f 100644 --- a/src/main/java/gregtech/api/interfaces/IGuiScreen.java +++ b/src/main/java/gregtech/api/interfaces/IGuiScreen.java @@ -1,13 +1,15 @@ package gregtech.api.interfaces; -import gregtech.api.gui.widgets.GT_GuiTooltip; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.renderer.entity.RenderItem; +import gregtech.api.gui.widgets.GT_GuiTooltip; + public interface IGuiScreen { interface IGuiElement { + void onInit(); default void onRemoved() {} diff --git a/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java b/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java index dc844b8a85..59bac8296b 100644 --- a/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java +++ b/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java @@ -1,5 +1,6 @@ package gregtech.api.interfaces; public interface IHasFluidDisplayItem { + void updateFluidDisplayItem(); } diff --git a/src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java b/src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java index 7401d35323..ed31984b6e 100644 --- a/src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java +++ b/src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java @@ -4,10 +4,12 @@ package gregtech.api.interfaces; * To be implemented on blocks. Usually machine casing blocks. */ public interface IHasIndexedTexture { + /** * Returns the statically mapped texture for this casing. Return * {@link gregtech.api.enums.Textures.BlockIcons#ERROR_TEXTURE_INDEX} if meta maps to a nonexistent block, or the * block does not have a statically mapped texture. + * * @param aMeta block meta * @return texture index into {@link gregtech.api.enums.Textures.BlockIcons#casingTexturePages} */ diff --git a/src/main/java/gregtech/api/interfaces/IHatchElement.java b/src/main/java/gregtech/api/interfaces/IHatchElement.java index 276a7a1a9c..254d9562c2 100644 --- a/src/main/java/gregtech/api/interfaces/IHatchElement.java +++ b/src/main/java/gregtech/api/interfaces/IHatchElement.java @@ -1,19 +1,23 @@ package gregtech.api.interfaces; -import com.google.common.collect.ImmutableList; -import com.gtnewhorizon.structurelib.structure.IStructureElement; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_StructureUtility; -import gregtech.api.util.IGT_HatchAdder; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.function.BiPredicate; import java.util.function.ToLongFunction; + import net.minecraftforge.common.util.ForgeDirection; +import com.google.common.collect.ImmutableList; +import com.gtnewhorizon.structurelib.structure.IStructureElement; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_StructureUtility; +import gregtech.api.util.IGT_HatchAdder; + public interface IHatchElement { + List> mteClasses(); IGT_HatchAdder adder(); @@ -55,35 +59,21 @@ public interface IHatchElement { default IStructureElement newAny(int aCasingIndex, int aDot) { if (aCasingIndex < 0 || aDot < 0) throw new IllegalArgumentException(); - return GT_StructureUtility.buildHatchAdder() - .anyOf(this) - .casingIndex(aCasingIndex) - .dot(aDot) - .continueIfSuccess() - .build(); + return GT_StructureUtility.buildHatchAdder().anyOf(this).casingIndex(aCasingIndex).dot(aDot) + .continueIfSuccess().build(); } default IStructureElement newAny(int aCasingIndex, int aDot, ForgeDirection... allowedFacings) { if (aCasingIndex < 0 || aDot < 0) throw new IllegalArgumentException(); - return GT_StructureUtility.buildHatchAdder() - .anyOf(this) - .casingIndex(aCasingIndex) - .dot(aDot) - .continueIfSuccess() - .allowOnly(allowedFacings) - .build(); + return GT_StructureUtility.buildHatchAdder().anyOf(this).casingIndex(aCasingIndex).dot(aDot) + .continueIfSuccess().allowOnly(allowedFacings).build(); } - default IStructureElement newAny( - int aCasingIndex, int aDot, BiPredicate aShouldSkip) { + default IStructureElement newAny(int aCasingIndex, int aDot, + BiPredicate aShouldSkip) { if (aCasingIndex < 0 || aDot < 0 || aShouldSkip == null) throw new IllegalArgumentException(); - return GT_StructureUtility.buildHatchAdder() - .anyOf(this) - .casingIndex(aCasingIndex) - .dot(aDot) - .shouldSkip(aShouldSkip) - .continueIfSuccess() - .build(); + return GT_StructureUtility.buildHatchAdder().anyOf(this).casingIndex(aCasingIndex).dot(aDot) + .shouldSkip(aShouldSkip).continueIfSuccess().build(); } default IHatchElement or(IHatchElement fallback) { @@ -92,6 +82,7 @@ public interface IHatchElement { } class HatchElementEither implements IHatchElement { + private final IHatchElement first, second; private ImmutableList> mMteClasses; private String name; @@ -103,11 +94,8 @@ class HatchElementEither implements IHatchElement { @Override public List> mteClasses() { - if (mMteClasses == null) - mMteClasses = ImmutableList.>builder() - .addAll(first.mteClasses()) - .addAll(second.mteClasses()) - .build(); + if (mMteClasses == null) mMteClasses = ImmutableList.>builder() + .addAll(first.mteClasses()).addAll(second.mteClasses()).build(); return mMteClasses; } @@ -129,18 +117,15 @@ class HatchElementEither implements IHatchElement { } class HatchElement implements IHatchElement { + private final List> mClasses; private final IGT_HatchAdder mAdder; private final String mName; private final IHatchElement mBacking; private final ToLongFunction mCount; - public HatchElement( - List> aMteClasses, - IGT_HatchAdder aAdder, - String aName, - ToLongFunction aCount, - IHatchElement aBacking) { + public HatchElement(List> aMteClasses, IGT_HatchAdder aAdder, + String aName, ToLongFunction aCount, IHatchElement aBacking) { this.mClasses = aMteClasses; this.mAdder = aAdder; this.mName = aName; diff --git a/src/main/java/gregtech/api/interfaces/IHeatingCoil.java b/src/main/java/gregtech/api/interfaces/IHeatingCoil.java index f30145165b..37f7969d56 100644 --- a/src/main/java/gregtech/api/interfaces/IHeatingCoil.java +++ b/src/main/java/gregtech/api/interfaces/IHeatingCoil.java @@ -1,9 +1,11 @@ package gregtech.api.interfaces; -import gregtech.api.enums.HeatingCoilLevel; import java.util.function.Consumer; + import net.minecraft.item.ItemStack; +import gregtech.api.enums.HeatingCoilLevel; + public interface IHeatingCoil { HeatingCoilLevel getCoilHeat(int meta); diff --git a/src/main/java/gregtech/api/interfaces/IIconContainer.java b/src/main/java/gregtech/api/interfaces/IIconContainer.java index 8090ce7cb9..fbb9e53519 100644 --- a/src/main/java/gregtech/api/interfaces/IIconContainer.java +++ b/src/main/java/gregtech/api/interfaces/IIconContainer.java @@ -2,12 +2,14 @@ package gregtech.api.interfaces; import static gregtech.api.enums.GT_Values.UNCOLORED_RBGA; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public interface IIconContainer { + /** * @return A regular Icon. */ @@ -26,8 +28,7 @@ public interface IIconContainer { @SideOnly(Side.CLIENT) default int getIconPasses() { return 1; - } - ; + }; /** * @return the Default Texture File for this Icon. diff --git a/src/main/java/gregtech/api/interfaces/IItemBehaviour.java b/src/main/java/gregtech/api/interfaces/IItemBehaviour.java index 9a513c2af5..33e5db783a 100644 --- a/src/main/java/gregtech/api/interfaces/IItemBehaviour.java +++ b/src/main/java/gregtech/api/interfaces/IItemBehaviour.java @@ -1,8 +1,7 @@ package gregtech.api.interfaces; -import gregtech.api.enums.SubTag; -import gregtech.api.items.GT_MetaBase_Item; import java.util.List; + import net.minecraft.dispenser.IBlockSource; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -12,34 +11,18 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import gregtech.api.enums.SubTag; +import gregtech.api.items.GT_MetaBase_Item; + public interface IItemBehaviour { + boolean onLeftClickEntity(E aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity); - boolean onItemUse( - E aItem, - ItemStack aStack, - EntityPlayer aPlayer, - World aWorld, - int aX, - int aY, - int aZ, - int aSide, - float hitX, - float hitY, - float hitZ); - - boolean onItemUseFirst( - E aItem, - ItemStack aStack, - EntityPlayer aPlayer, - World aWorld, - int aX, - int aY, - int aZ, - int aSide, - float hitX, - float hitY, - float hitZ); + boolean onItemUse(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, + float hitX, float hitY, float hitZ); + + boolean onItemUseFirst(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, + int aSide, float hitX, float hitY, float hitZ); ItemStack onItemRightClick(E aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer); @@ -55,9 +38,9 @@ public interface IItemBehaviour { boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack); - EntityArrow getProjectile( - E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); + EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, + double aZ); - EntityArrow getProjectile( - E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); + EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, + float aSpeed); } diff --git a/src/main/java/gregtech/api/interfaces/IItemContainer.java b/src/main/java/gregtech/api/interfaces/IItemContainer.java index 36363b8da1..de94606e95 100644 --- a/src/main/java/gregtech/api/interfaces/IItemContainer.java +++ b/src/main/java/gregtech/api/interfaces/IItemContainer.java @@ -5,6 +5,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public interface IItemContainer { + Item getItem(); Block getBlock(); diff --git a/src/main/java/gregtech/api/interfaces/IMaterialHandler.java b/src/main/java/gregtech/api/interfaces/IMaterialHandler.java index 9ca97981bf..b26951121b 100644 --- a/src/main/java/gregtech/api/interfaces/IMaterialHandler.java +++ b/src/main/java/gregtech/api/interfaces/IMaterialHandler.java @@ -3,6 +3,7 @@ package gregtech.api.interfaces; import gregtech.api.enums.Materials; public interface IMaterialHandler { + void onMaterialsInit(); void onComponentInit(); diff --git a/src/main/java/gregtech/api/interfaces/INetworkUpdatableItem.java b/src/main/java/gregtech/api/interfaces/INetworkUpdatableItem.java index de251017a1..b7e7b0ce33 100644 --- a/src/main/java/gregtech/api/interfaces/INetworkUpdatableItem.java +++ b/src/main/java/gregtech/api/interfaces/INetworkUpdatableItem.java @@ -5,19 +5,21 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; /** - * Together with {@link gregtech.api.net.GT_Packet_UpdateItem} you can request server side to update item in hand with - * a NBT tag. + * Together with {@link gregtech.api.net.GT_Packet_UpdateItem} you can request server side to update item in hand with a + * NBT tag. * * Usual NBT tag size limit applies. */ public interface INetworkUpdatableItem { + /** * Receive update from client. Runs on server thread. - * @param stack Stack being updated + * + * @param stack Stack being updated * @param player player holding the stack - * @param tag received data - * @return true if this stack should be kept inside the player inventory. - * false if this stack should vanish (i.e. slot content set to null) + * @param tag received data + * @return true if this stack should be kept inside the player inventory. false if this stack should vanish (i.e. + * slot content set to null) */ boolean receive(ItemStack stack, EntityPlayerMP player, NBTTagCompound tag); } diff --git a/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java b/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java index 322586dc90..714342ae7e 100644 --- a/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java +++ b/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java @@ -1,12 +1,15 @@ package gregtech.api.interfaces; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import net.minecraft.item.ItemStack; public interface IOreRecipeRegistrator { + /** - * Contains a Code Fragment, used in the OrePrefix to register Recipes. Better than using a switch/case, like I did before. + * Contains a Code Fragment, used in the OrePrefix to register Recipes. Better than using a switch/case, like I did + * before. * * @param aPrefix always != null * @param aMaterial always != null, and can be == _NULL if the Prefix is Self Referencing or not Material based! diff --git a/src/main/java/gregtech/api/interfaces/IProjectileItem.java b/src/main/java/gregtech/api/interfaces/IProjectileItem.java index 9441e2991b..a1cfb7f4d1 100644 --- a/src/main/java/gregtech/api/interfaces/IProjectileItem.java +++ b/src/main/java/gregtech/api/interfaces/IProjectileItem.java @@ -1,25 +1,29 @@ package gregtech.api.interfaces; -import gregtech.api.enums.SubTag; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import gregtech.api.enums.SubTag; + public interface IProjectileItem { + /** * @return if this Item has an Arrow Entity */ boolean hasProjectile(SubTag aProjectileType, ItemStack aStack); /** - * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow + * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend + * EntityArrow */ EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); /** - * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow + * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend + * EntityArrow */ - EntityArrow getProjectile( - SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); + EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, + float aSpeed); } diff --git a/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java b/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java index 73a81cc74b..91219368b7 100644 --- a/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java +++ b/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java @@ -1,14 +1,16 @@ package gregtech.api.interfaces; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.util.GT_CoverBehavior; import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; + /** * Implemented by the MetaTileEntity of the Redstone Circuit Block */ public interface IRedstoneCircuitBlock { + /** * The Output Direction the Circuit Block is Facing */ @@ -20,8 +22,8 @@ public interface IRedstoneCircuitBlock { boolean setRedstone(byte aStrength, byte aSide); /** - * returns Output Redstone State at Side - * Note that setRedstone checks if there is a Difference between the old and the new Setting before consuming any Energy + * returns Output Redstone State at Side Note that setRedstone checks if there is a Difference between the old and + * the new Setting before consuming any Energy */ byte getOutputRedstone(byte aSide); diff --git a/src/main/java/gregtech/api/interfaces/ISecondaryDescribable.java b/src/main/java/gregtech/api/interfaces/ISecondaryDescribable.java index 9c3c9ed219..1f480091fc 100644 --- a/src/main/java/gregtech/api/interfaces/ISecondaryDescribable.java +++ b/src/main/java/gregtech/api/interfaces/ISecondaryDescribable.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces; * To get a tooltip with a secondary description */ public interface ISecondaryDescribable extends IDescribable { + /** * Convenient to call when overriding the `String[] getDescription()` method. */ diff --git a/src/main/java/gregtech/api/interfaces/ISubTagContainer.java b/src/main/java/gregtech/api/interfaces/ISubTagContainer.java index e067579a1d..3e3690c67b 100644 --- a/src/main/java/gregtech/api/interfaces/ISubTagContainer.java +++ b/src/main/java/gregtech/api/interfaces/ISubTagContainer.java @@ -3,6 +3,7 @@ package gregtech.api.interfaces; import gregtech.api.enums.SubTag; public interface ISubTagContainer { + /** * @return if the Tag is inside the List. */ diff --git a/src/main/java/gregtech/api/interfaces/ITexture.java b/src/main/java/gregtech/api/interfaces/ITexture.java index e2445a8204..e97fa4539a 100644 --- a/src/main/java/gregtech/api/interfaces/ITexture.java +++ b/src/main/java/gregtech/api/interfaces/ITexture.java @@ -5,6 +5,7 @@ import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; public interface ITexture { + void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); @@ -28,10 +29,11 @@ public interface ITexture { /** * Will initialize the {@link Tessellator} if rendering off-world (Inventory) + * * @param aRenderer The {@link RenderBlocks} Renderer - * @param aNormalX The X Normal for current Quad Face - * @param aNormalY The Y Normal for current Quad Face - * @param aNormalZ The Z Normal for current Quad Face + * @param aNormalX The X Normal for current Quad Face + * @param aNormalY The Y Normal for current Quad Face + * @param aNormalZ The Z Normal for current Quad Face */ default void startDrawingQuads(RenderBlocks aRenderer, float aNormalX, float aNormalY, float aNormalZ) { if (aRenderer.useInventoryTint && !isOldTexture()) { @@ -42,6 +44,7 @@ public interface ITexture { /** * Will run the {@link Tessellator} to draw Quads if rendering off-world (Inventory) + * * @param aRenderer The {@link RenderBlocks} Renderer */ default void draw(RenderBlocks aRenderer) { diff --git a/src/main/java/gregtech/api/interfaces/ITextureBuilder.java b/src/main/java/gregtech/api/interfaces/ITextureBuilder.java index d8ae592c9e..95c7639477 100644 --- a/src/main/java/gregtech/api/interfaces/ITextureBuilder.java +++ b/src/main/java/gregtech/api/interfaces/ITextureBuilder.java @@ -1,15 +1,21 @@ package gregtech.api.interfaces; -import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; -import gregtech.api.render.TextureFactory; import net.minecraft.block.Block; import net.minecraftforge.common.util.ForgeDirection; +import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; +import gregtech.api.render.TextureFactory; + /** - *

This Interface defines operations to configure and build instances of the {@link ITexture} implementations

- *

Use the {@link TextureFactory#builder()} method to get an instance of the {@link ITextureBuilder} implementation.

+ *

+ * This Interface defines operations to configure and build instances of the {@link ITexture} implementations + *

+ *

+ * Use the {@link TextureFactory#builder()} method to get an instance of the {@link ITextureBuilder} implementation. + *

*/ public interface ITextureBuilder { + /** * Build the {@link ITexture} * @@ -20,14 +26,19 @@ public interface ITextureBuilder { /** * @param block The {@link Block} - * @param meta The meta value for the Block + * @param meta The meta value for the Block * @return {@link ITextureBuilder} for chaining */ ITextureBuilder setFromBlock(final Block block, final int meta); /** - * @param side

The {@link ForgeDirection} side providing the texture

- *

Default is {@link ForgeDirection#UNKNOWN} to use same side as rendered

+ * @param side + *

+ * The {@link ForgeDirection} side providing the texture + *

+ *

+ * Default is {@link ForgeDirection#UNKNOWN} to use same side as rendered + *

* @return {@link ITextureBuilder} for chaining */ ITextureBuilder setFromSide(final ForgeDirection side); @@ -52,6 +63,7 @@ public interface ITextureBuilder { /** * Set alpha blending + * * @param allowAlpha to set * * @return {@link ITextureBuilder} for chaining diff --git a/src/main/java/gregtech/api/interfaces/IToolStats.java b/src/main/java/gregtech/api/interfaces/IToolStats.java index 9dcfc4bce8..91c8564a51 100644 --- a/src/main/java/gregtech/api/interfaces/IToolStats.java +++ b/src/main/java/gregtech/api/interfaces/IToolStats.java @@ -1,7 +1,7 @@ package gregtech.api.interfaces; -import gregtech.api.items.GT_MetaGenerated_Tool; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; @@ -12,12 +12,15 @@ import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.event.world.BlockEvent; +import gregtech.api.items.GT_MetaGenerated_Tool; + /** * The Stats for GT Tools. Not including any Material Modifiers. *

* And this is supposed to not have any ItemStack Parameters as these are generic Stats. */ public interface IToolStats { + /** * Called when aPlayer crafts this Tool */ @@ -39,7 +42,8 @@ public interface IToolStats { int getToolDamagePerDropConversion(); /** - * @return Damage the Tool receives when being used as Container Item. 100 is one use, however it is usually 8 times more than normal. + * @return Damage the Tool receives when being used as Container Item. 100 is one use, however it is usually 8 times + * more than normal. */ int getToolDamagePerContainerCraft(); @@ -49,7 +53,8 @@ public interface IToolStats { int getToolDamagePerEntityAttack(); /** - * @return Basic Quality of the Tool, 0 is normal. If increased, it will increase the general quality of all Tools of this Type. Decreasing is also possible. + * @return Basic Quality of the Tool, 0 is normal. If increased, it will increase the general quality of all Tools + * of this Type. Decreasing is also possible. */ int getBaseQuality(); @@ -122,7 +127,8 @@ public interface IToolStats { boolean isWeapon(); /** - * @return If this Tool is a Ranged Weapon. Return false at isWeapon unless you have a Blade attached to your Bow/Gun or something + * @return If this Tool is a Ranged Weapon. Return false at isWeapon unless you have a Blade attached to your + * Bow/Gun or something */ boolean isRangedWeapon(); @@ -132,10 +138,12 @@ public interface IToolStats { boolean isMiningTool(); /** - * aBlock.getHarvestTool(aMetaData) can return the following Values for example. - * "axe", "pickaxe", "sword", "shovel", "hoe", "grafter", "saw", "wrench", "crowbar", "file", "hammer", "plow", "plunger", "scoop", "screwdriver", "sense", "scythe", "softhammer", "cutter", "plasmatorch" + * aBlock.getHarvestTool(aMetaData) can return the following Values for example. "axe", "pickaxe", "sword", + * "shovel", "hoe", "grafter", "saw", "wrench", "crowbar", "file", "hammer", "plow", "plunger", "scoop", + * "screwdriver", "sense", "scythe", "softhammer", "cutter", "plasmatorch" * - * @return If this is a minable Block. Tool Quality checks (like Diamond Tier or something) are separate from this check. + * @return If this is a minable Block. Tool Quality checks (like Diamond Tier or something) are separate from this + * check. */ boolean isMinableBlock(Block aBlock, byte aMetaData); @@ -144,18 +152,8 @@ public interface IToolStats { * * @return the Amount of modified Items. */ - int convertBlockDrops( - List aDrops, - ItemStack aStack, - EntityPlayer aPlayer, - Block aBlock, - int aX, - int aY, - int aZ, - byte aMetaData, - int aFortune, - boolean aSilkTouch, - BlockEvent.HarvestDropsEvent aEvent); + int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, + int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); /** * @return Returns a broken Version of the Item. @@ -176,6 +174,6 @@ public interface IToolStats { short[] getRGBa(boolean aIsToolHead, ItemStack aStack); - float getMiningSpeed( - Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, int aX, int aY, int aZ); + float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, int aX, + int aY, int aZ); } diff --git a/src/main/java/gregtech/api/interfaces/covers/IControlsWorkCover.java b/src/main/java/gregtech/api/interfaces/covers/IControlsWorkCover.java index 47edc7af93..cef20ac3b7 100644 --- a/src/main/java/gregtech/api/interfaces/covers/IControlsWorkCover.java +++ b/src/main/java/gregtech/api/interfaces/covers/IControlsWorkCover.java @@ -11,8 +11,8 @@ import gregtech.api.interfaces.tileentity.IMachineProgress; public interface IControlsWorkCover { /** - * Make sure there is only one GT_Cover_ControlsWork on the aTileEntity - * TODO this is a migration thing. Remove this after 2.3.0 is released. + * Make sure there is only one GT_Cover_ControlsWork on the aTileEntity TODO this is a migration thing. Remove this + * after 2.3.0 is released. * * @return true if the cover is the first (side) one **/ diff --git a/src/main/java/gregtech/api/interfaces/fluid/IGT_FluidBuilder.java b/src/main/java/gregtech/api/interfaces/fluid/IGT_FluidBuilder.java index a643b8aace..00bfd6dbe8 100644 --- a/src/main/java/gregtech/api/interfaces/fluid/IGT_FluidBuilder.java +++ b/src/main/java/gregtech/api/interfaces/fluid/IGT_FluidBuilder.java @@ -1,14 +1,17 @@ package gregtech.api.interfaces.fluid; -import gregtech.api.enums.FluidState; import javax.annotation.Nonnull; + import net.minecraft.block.Block; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; +import gregtech.api.enums.FluidState; + @SuppressWarnings("unused") // API might legitimately expose unused methods within this local project's scope public interface IGT_FluidBuilder { + /** * @param colorRGBA The {@code short[]} RGBA color of the {@link Fluid} or {@code null} for no defined RGBA color * @return {@link IGT_FluidBuilder} self for call chaining @@ -72,8 +75,8 @@ public interface IGT_FluidBuilder { * @return {@link IGT_FluidBuilder} self for call chaining */ @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value - IGT_FluidBuilder withTextures( - final ResourceLocation stillIconResourceLocation, final ResourceLocation flowingIconResourceLocation); + IGT_FluidBuilder withTextures(final ResourceLocation stillIconResourceLocation, + final ResourceLocation flowingIconResourceLocation); /** * Builds the {@link IGT_Fluid} diff --git a/src/main/java/gregtech/api/interfaces/fluid/IGT_RegisteredFluid.java b/src/main/java/gregtech/api/interfaces/fluid/IGT_RegisteredFluid.java index f4d278e2b0..e7c220607a 100644 --- a/src/main/java/gregtech/api/interfaces/fluid/IGT_RegisteredFluid.java +++ b/src/main/java/gregtech/api/interfaces/fluid/IGT_RegisteredFluid.java @@ -1,11 +1,12 @@ package gregtech.api.interfaces.fluid; -import gregtech.api.enums.FluidState; -import gregtech.api.enums.Materials; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; +import gregtech.api.enums.FluidState; +import gregtech.api.enums.Materials; + public interface IGT_RegisteredFluid { /** @@ -17,11 +18,12 @@ public interface IGT_RegisteredFluid { * @return The {@link IGT_RegisteredFluid} for call chaining */ @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value - IGT_RegisteredFluid registerContainers( - final ItemStack fullContainer, final ItemStack emptyContainer, final int containerSize); + IGT_RegisteredFluid registerContainers(final ItemStack fullContainer, final ItemStack emptyContainer, + final int containerSize); /** - * Registers the bucket-sized 1000L containers in the {@link FluidContainerRegistry} for this {@link IGT_RegisteredFluid} + * Registers the bucket-sized 1000L containers in the {@link FluidContainerRegistry} for this + * {@link IGT_RegisteredFluid} * * @param fullContainer The full container to associate with this {@link IGT_RegisteredFluid} * @param emptyContainer The empty container associate with this {@link IGT_RegisteredFluid} @@ -31,7 +33,8 @@ public interface IGT_RegisteredFluid { IGT_RegisteredFluid registerBContainers(final ItemStack fullContainer, final ItemStack emptyContainer); /** - * Registers the potion-sized 250L containers in the {@link FluidContainerRegistry} for this {@link IGT_RegisteredFluid} + * Registers the potion-sized 250L containers in the {@link FluidContainerRegistry} for this + * {@link IGT_RegisteredFluid} * * @param fullContainer The full container to associate with this {@link IGT_RegisteredFluid} * @param emptyContainer The empty container associate with this {@link IGT_RegisteredFluid} @@ -43,7 +46,8 @@ public interface IGT_RegisteredFluid { /** * Updates the {@link Materials}'s fluids from this {@link IGT_RegisteredFluid}'s state * - * @param material the {@link Materials} to configure based on this {@link IGT_RegisteredFluid} and {@link FluidState} + * @param material the {@link Materials} to configure based on this {@link IGT_RegisteredFluid} and + * {@link FluidState} * @return The {@link IGT_RegisteredFluid} for call chaining */ @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value diff --git a/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java b/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java index dd73ffc1e7..4acfa62549 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java @@ -3,6 +3,6 @@ package gregtech.api.interfaces.internal; /** * A simple compound Interface for generic BuildCraft Code. */ -public interface IBCTileEntity /*extends IPowerReceptor*/ { +public interface IBCTileEntity /* extends IPowerReceptor */ { // } diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java b/src/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java index 0bb4155214..3f29736470 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java @@ -3,5 +3,6 @@ package gregtech.api.interfaces.internal; import net.minecraft.item.crafting.IRecipe; public interface IGT_CraftingRecipe extends IRecipe { + boolean isRemovable(); } diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java b/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java index 19e7a56aad..dbf888ef96 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java @@ -10,18 +10,22 @@ import net.minecraft.world.World; * Don't even think about including this File in your Mod. */ public interface IGT_Mod { + /** - * This means that Server specific Basefiles are definitely existing! Not if the World is actually server side or not! + * This means that Server specific Basefiles are definitely existing! Not if the World is actually server side or + * not! */ boolean isServerSide(); /** - * This means that Client specific Basefiles are definitely existing! Not if the World is actually client side or not! + * This means that Client specific Basefiles are definitely existing! Not if the World is actually client side or + * not! */ boolean isClientSide(); /** - * This means that Bukkit specific Basefiles are definitely existing! Not if the World is actually bukkit server or not! + * This means that Bukkit specific Basefiles are definitely existing! Not if the World is actually bukkit server or + * not! */ boolean isBukkitSide(); diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java index 77e6bd6742..342d3a5403 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -1,23 +1,19 @@ package gregtech.api.interfaces.internal; -import gregtech.api.util.GT_Recipe; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; +import gregtech.api.util.GT_Recipe; + public interface IGT_RecipeAdder { + /** - * Adds a FusionreactorRecipe - * Does not work anymore! + * Adds a FusionreactorRecipe Does not work anymore! */ @Deprecated - boolean addFusionReactorRecipe( - ItemStack aInput1, - ItemStack aInput2, - ItemStack aOutput1, - int aFusionDurationInTicks, - int aFusionEnergyPerTick, - int aEnergyNeededForStartingFusion); + boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aFusionDurationInTicks, + int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); /** * Adds a FusionreactorRecipe @@ -31,13 +27,8 @@ public interface IGT_RecipeAdder { * @return true if the Recipe got added, otherwise false. */ @Deprecated - boolean addFusionReactorRecipe( - FluidStack aInput1, - FluidStack aInput2, - FluidStack aOutput1, - int aFusionDurationInTicks, - int aFusionEnergyPerTick, - int aEnergyNeededForStartingFusion); + boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, + int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); /** * Adds a Fusion Reactor Recipe @@ -49,45 +40,24 @@ public interface IGT_RecipeAdder { * @param aEnergyNeededForStartingFusion : EU needed to initialize the fusion reaction. (must be >= 0). * @return true if the recipe got added, otherwise false. */ - boolean addFusionReactorRecipe( - FluidStack[] FluidInputArray, - FluidStack[] FluidOutputArray, - int aFusionDurationInTicks, - int aFusionEnergyPerTick, - int aEnergyNeededForStartingFusion); + boolean addFusionReactorRecipe(FluidStack[] FluidInputArray, FluidStack[] FluidOutputArray, + int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); /** * Adds a Centrifuge Recipe * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @param aDuration must be > 0 - */ - boolean addCentrifugeRecipe( - ItemStack aInput1, - int aInput2, - ItemStack aOutput1, - ItemStack aOutput2, - ItemStack aOutput3, - ItemStack aOutput4, - ItemStack aOutput5, - ItemStack aOutput6, - int aDuration); - - boolean addCentrifugeRecipe( - ItemStack aInput1, - int aInput2, - ItemStack aOutput1, - ItemStack aOutput2, - ItemStack aOutput3, - ItemStack aOutput4, - ItemStack aOutput5, - ItemStack aOutput6, - int aDuration, - int aEUt); + * @param aInput1 must be != null + * @param aOutput1 must be != null + * @param aOutput2 can be null + * @param aOutput3 can be null + * @param aOutput4 can be null + * @param aDuration must be > 0 + */ + boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, + ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration); + + boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, + ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt); /** * Adds a Centrifuge Recipe @@ -99,36 +69,13 @@ public interface IGT_RecipeAdder { * @param aOutput4 can be null * @param aDuration must be > 0 */ - boolean addCentrifugeRecipe( - ItemStack aInput1, - ItemStack aInput2, - FluidStack aFluidInput, - FluidStack aFluidOutput, - ItemStack aOutput1, - ItemStack aOutput2, - ItemStack aOutput3, - ItemStack aOutput4, - ItemStack aOutput5, - ItemStack aOutput6, - int[] aChances, - int aDuration, - int aEUt); + boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, + ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, + ItemStack aOutput6, int[] aChances, int aDuration, int aEUt); - boolean addCentrifugeRecipe( - ItemStack aInput1, - ItemStack aInput2, - FluidStack aFluidInput, - FluidStack aFluidOutput, - ItemStack aOutput1, - ItemStack aOutput2, - ItemStack aOutput3, - ItemStack aOutput4, - ItemStack aOutput5, - ItemStack aOutput6, - int[] aChances, - int aDuration, - int aEUt, - boolean aCleanroom); + boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, + ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, + ItemStack aOutput6, int[] aChances, int aDuration, int aEUt, boolean aCleanroom); /** * @param aInput1 must be != null @@ -141,51 +88,31 @@ public interface IGT_RecipeAdder { /** * Adds a Electrolyzer Recipe * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - boolean addElectrolyzerRecipe( - ItemStack aInput1, - int aInput2, - ItemStack aOutput1, - ItemStack aOutput2, - ItemStack aOutput3, - ItemStack aOutput4, - ItemStack aOutput5, - ItemStack aOutput6, - int aDuration, - int aEUt); + * @param aInput1 must be != null + * @param aOutput1 must be != null + * @param aOutput2 can be null + * @param aOutput3 can be null + * @param aOutput4 can be null + * @param aDuration must be > 0 + * @param aEUt should be > 0 + */ + boolean addElectrolyzerRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, + ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt); /** * Adds a Electrolyzer Recipe * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - boolean addElectrolyzerRecipe( - ItemStack aInput1, - ItemStack aInput2, - FluidStack aFluidInput, - FluidStack aFluidOutput, - ItemStack aOutput1, - ItemStack aOutput2, - ItemStack aOutput3, - ItemStack aOutput4, - ItemStack aOutput5, - ItemStack aOutput6, - int[] aChances, - int aDuration, - int aEUt); + * @param aInput1 must be != null + * @param aOutput1 must be != null + * @param aOutput2 can be null + * @param aOutput3 can be null + * @param aOutput4 can be null + * @param aDuration must be > 0 + * @param aEUt should be > 0 + */ + boolean addElectrolyzerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, + ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, + ItemStack aOutput6, int[] aChances, int aDuration, int aEUt); /** * Adds a Chemical Recipe @@ -207,54 +134,36 @@ public interface IGT_RecipeAdder { * @param aOutput must be != null * @param aDuration must be > 0 */ - boolean addChemicalRecipe( - ItemStack aInput1, - ItemStack aInput2, - FluidStack aFluidInput, - FluidStack aFluidOutput, - ItemStack aOutput, - int aDuration); + boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, + ItemStack aOutput, int aDuration); /** - * Adds a Chemical Recipe - * Only use this when the recipe conflicts in MultiBlock! + * Adds a Chemical Recipe Only use this when the recipe conflicts in MultiBlock! * * @param aInput1 must be != null * @param aInput2 must be != null - * @param aOutput must be != null + * @param aOutput must be != null * @param aOutput2 must be != null * @param aDuration must be > 0 */ - boolean addChemicalRecipeForBasicMachineOnly( - ItemStack aInput1, - ItemStack aInput2, - FluidStack aFluidInput, - FluidStack aFluidOutput, - ItemStack aOutput, - ItemStack aOutput2, - int aDuration, - int aEUtick); + boolean addChemicalRecipeForBasicMachineOnly(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, + FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick); /** * Adds a Chemical Recipe * * @param aInput1 must be != null * @param aInput2 must be != null - * @param aOutput must be != null + * @param aOutput must be != null * @param aOutput2 must be != null * @param aDuration must be > 0 */ - boolean addChemicalRecipe( - ItemStack aInput1, - ItemStack aInput2, - FluidStack aFluidInput, - FluidStack aFluidOutput, - ItemStack aOutput, - ItemStack aOutput2, - int aDuration); + boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, + ItemStack aOutput, ItemStack aOutput2, int aDuration); /** - * Adds Recipes for creating a radically polymerized polymer from a base Material (for example Ethylene -> Polyethylene) + * Adds Recipes for creating a radically polymerized polymer from a base Material (for example Ethy