diff options
author | Jason Mitchell <mitchej@gmail.com> | 2023-01-30 10:56:42 -0800 |
---|---|---|
committer | Jason Mitchell <mitchej@gmail.com> | 2023-01-30 10:56:42 -0800 |
commit | 0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a (patch) | |
tree | 1e2c649f3a6ce3f6b2babd0098a5f4819e9cd0b6 /src/main/java/gregtech/api/interfaces/tileentity | |
parent | f8cc82edeb9810c45cba762d733a2c909a302faa (diff) | |
download | GT5-Unofficial-0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a.tar.gz GT5-Unofficial-0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a.tar.bz2 GT5-Unofficial-0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a.zip |
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/gregtech/api/interfaces/tileentity')
25 files changed, 178 insertions, 157 deletions
diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java b/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java index 7b0bc9c690..44b59ffce1 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java @@ -4,16 +4,16 @@ package gregtech.api.interfaces.tileentity; * Interface for internal Code, which is mainly used for independent Energy conversion. */ public interface IBasicEnergyContainer extends IEnergyConnected { + /** - * Gets if that Amount of Energy is stored inside the Machine. - * It is used for checking the contained Energy before consuming it. - * If this returns false, it will also give a Message inside the Scanner, that this Machine doesn't have enough Energy. + * Gets if that Amount of Energy is stored inside the Machine. It is used for checking the contained Energy before + * consuming it. If this returns false, it will also give a Message inside the Scanner, that this Machine doesn't + * have enough Energy. */ boolean isUniversalEnergyStored(long aEnergyAmount); /** - * Gets the stored electric, kinetic or steam Energy (with EU as reference Value) - * Always returns the largest one. + * Gets the stored electric, kinetic or steam Energy (with EU as reference Value) Always returns the largest one. */ long getUniversalEnergyStored(); @@ -43,12 +43,14 @@ public interface IBasicEnergyContainer extends IEnergyConnected { long getInputVoltage(); /** - * Decreases the Amount of stored universal Energy. If ignoring too less Energy, then it just sets the Energy to 0 and returns false. + * Decreases the Amount of stored universal Energy. If ignoring too less Energy, then it just sets the Energy to 0 + * and returns false. */ boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy); /** - * Increases the Amount of stored electric Energy. If ignoring too much Energy, then the Energy Limit is just being ignored. + * Increases the Amount of stored electric Energy. If ignoring too much Energy, then the Energy Limit is just being + * ignored. */ boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy); @@ -97,8 +99,8 @@ public interface IBasicEnergyContainer extends IEnergyConnected { * @param aEnergy The Energy to add to the Machine. * @param aIgnoreTooMuchEnergy if it shall ignore if it has too much Energy. * @return if it was successful - * <p/> - * And yes, you can't directly decrease the Steam of a Machine. That is done by decreaseStoredEnergyUnits + * <p/> + * And yes, you can't directly decrease the Steam of a Machine. That is done by decreaseStoredEnergyUnits */ default boolean increaseStoredSteam(long aEnergy, boolean aIgnoreTooMuchEnergy) { return false; diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IColoredTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IColoredTileEntity.java index 3bcf441128..3a17df4717 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IColoredTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IColoredTileEntity.java @@ -4,6 +4,7 @@ import gregtech.api.enums.Dyes; import gregtech.api.util.GT_Util; public interface IColoredTileEntity { + /** * @return 0 - 15 are Colors, while -1 means uncolored */ @@ -20,7 +21,7 @@ public interface IColoredTileEntity { * @return Actual color shown on GUI */ default int getGUIColorization() { - return GT_Util.getRGBInt( - (getColorization() != -1 ? Dyes.get(getColorization()) : Dyes.MACHINE_METAL).getRGBA()); + return GT_Util + .getRGBInt((getColorization() != -1 ? Dyes.get(getColorization()) : Dyes.MACHINE_METAL).getRGBA()); } } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java b/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java index df131c84c2..f23c5a64c9 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java @@ -1,13 +1,15 @@ package gregtech.api.interfaces.tileentity; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; + import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.ISerializableObject; import gregtech.common.covers.CoverInfo; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; public interface ICoverable extends IRedstoneTileEntity, IHasInventory, IBasicEnergyContainer { + boolean canPlaceCoverIDAtSide(byte aSide, int aID); boolean canPlaceCoverItemAtSide(byte aSide, ItemStack aCover); @@ -53,20 +55,19 @@ public interface ICoverable extends IRedstoneTileEntity, IHasInventory, IBasicEn } /** - * For use by the regular MetaTileEntities. Returns the Cover Manipulated input Redstone. - * Don't use this if you are a Cover Behavior. Only for MetaTileEntities. + * For use by the regular MetaTileEntities. Returns the Cover Manipulated input Redstone. Don't use this if you are + * a Cover Behavior. Only for MetaTileEntities. */ byte getInternalInputRedstoneSignal(byte aSide); /** - * For use by the regular MetaTileEntities. This makes it not conflict with Cover based Redstone Signals. - * Don't use this if you are a Cover Behavior. Only for MetaTileEntities. + * For use by the regular MetaTileEntities. This makes it not conflict with Cover based Redstone Signals. Don't use + * this if you are a Cover Behavior. Only for MetaTileEntities. */ void setInternalOutputRedstoneSignal(byte aSide, byte aStrength); /** - * Causes a general Cover Texture update. - * Sends 6 Integers to Client + causes @issueTextureUpdate() + * Causes a general Cover Texture update. Sends 6 Integers to Client + causes @issueTextureUpdate() */ void issueCoverUpdate(byte aSide); @@ -77,10 +78,11 @@ public interface ICoverable extends IRedstoneTileEntity, IHasInventory, IBasicEn /** * Receiving a packet with cover data. + * * @param aPlayer the player who made the change */ - default void receiveCoverData( - byte aCoverSide, int aCoverID, ISerializableObject aCoverData, EntityPlayerMP aPlayer) { + default void receiveCoverData(byte aCoverSide, int aCoverID, ISerializableObject aCoverData, + EntityPlayerMP aPlayer) { if (aCoverData instanceof ISerializableObject.LegacyCoverData) receiveCoverData(aCoverSide, aCoverID, ((ISerializableObject.LegacyCoverData) aCoverData).get()); } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IDebugableTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IDebugableTileEntity.java index 4e3b03d970..5208944d66 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IDebugableTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IDebugableTileEntity.java @@ -1,18 +1,17 @@ package gregtech.api.interfaces.tileentity; import java.util.ArrayList; + import net.minecraft.entity.player.EntityPlayer; public interface IDebugableTileEntity { + /** * Returns a Debug Message, for a generic DebugItem * * @param aPlayer the Player, who rightclicked with his Debug Item - * @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<String> getDebugInfo(EntityPlayer aPlayer, int aLogLevel); diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java b/src/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java index 9d19e7cef0..9a08e65b78 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java @@ -6,16 +6,17 @@ import net.minecraft.item.ItemStack; * You are allowed to include this File in your Download, as i will not change it. */ public interface IDigitalChest extends IHasWorldObjectAndCoords { + /** - * Is this even a TileEntity of a Digital Chest? - * I need things like this Function for MetaTileEntities, you MUST check this!!! - * Do not assume that it's a Digital Chest or similar Device, when it just implements this Interface. + * Is this even a TileEntity of a Digital Chest? I need things like this Function for MetaTileEntities, you MUST + * check this!!! Do not assume that it's a Digital Chest or similar Device, when it just implements this Interface. */ boolean isDigitalChest(); /** - * Gives an Array of Stacks with Size (of all the Data-stored Items) of the correspondent Item kinds (regular QChests have only one) - * Does NOT include the 64 "ready" Items inside the Slots, and neither the 128 Items in the overflow Buffer. + * Gives an Array of Stacks with Size (of all the Data-stored Items) of the correspondent Item kinds (regular + * QChests have only one) Does NOT include the 64 "ready" Items inside the Slots, and neither the 128 Items in the + * overflow Buffer. */ ItemStack[] getStoredItemData(); @@ -25,7 +26,8 @@ public interface IDigitalChest extends IHasWorldObjectAndCoords { void setItemCount(int aCount); /** - * Gets the maximum Item count for this QChest alike Storage. This applies to the Data-Storage, not for the up to 192 buffered Items! + * Gets the maximum Item count for this QChest alike Storage. This applies to the Data-Storage, not for the up to + * 192 buffered Items! */ int getMaxItemCount(); } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java index 5a35e1ea52..f136434c54 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java @@ -8,6 +8,7 @@ import gregtech.api.enums.Materials; * Not all Data might be reliable. This is just for Information sake. */ public interface IEnergyConductor extends IEnergyConnected { + /** * @return if this is actually a Cable. (you must check this) */ diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index c1ecc2b153..d046418ea6 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -1,26 +1,29 @@ package gregtech.api.interfaces.tileentity; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + import cofh.api.energy.IEnergyReceiver; import gregtech.api.GregTech_API; import gregtech.api.util.GT_Utility; import ic2.api.energy.tile.IEnergySink; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; /** * Interface for getting Connected to the GregTech Energy Network. * <p/> - * This is all you need to connect to the GT Network. - * IColoredTileEntity is needed for not connecting differently coloured Blocks to each other. - * IHasWorldObjectAndCoords is needed for the InWorld related Stuff. @BaseTileEntity does implement most of that Interface. + * This is all you need to connect to the GT Network. IColoredTileEntity is needed for not connecting differently + * coloured Blocks to each other. IHasWorldObjectAndCoords is needed for the InWorld related Stuff. @BaseTileEntity does + * implement most of that Interface. */ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAndCoords { + /** * Inject Energy Call for Electricity. Gets called by EnergyEmitters to inject Energy into your Block * <p/> * Note: you have to check for @inputEnergyFrom because the Network won't check for that by itself. * - * @param aSide 0 - 5 = Vanilla Directions of YOUR Block the Energy gets inserted to. 6 = No specific Side (don't do Side checks for this Side) + * @param aSide 0 - 5 = Vanilla Directions of YOUR Block the Energy gets inserted to. 6 = No specific Side (don't do + * Side checks for this Side) * @return amount of used Amperes. 0 if not accepted anything. */ long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage); @@ -47,6 +50,7 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd * Utility for the Network */ final class Util { + /** * Emits Energy to the E-net. Also compatible with adjacent IC2 TileEntities. * @@ -69,15 +73,14 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd } else if (tTileEntity instanceof IEnergySink) { if (((IEnergySink) tTileEntity) .acceptsEnergyFrom((TileEntity) aEmitter, ForgeDirection.getOrientation(j))) { - while (aAmperage > rUsedAmperes - && ((IEnergySink) tTileEntity).getDemandedEnergy() > 0 + while (aAmperage > rUsedAmperes && ((IEnergySink) tTileEntity).getDemandedEnergy() > 0 && ((IEnergySink) tTileEntity) - .injectEnergy(ForgeDirection.getOrientation(j), aVoltage, aVoltage) - < aVoltage) rUsedAmperes++; + .injectEnergy(ForgeDirection.getOrientation(j), aVoltage, aVoltage) + < aVoltage) + rUsedAmperes++; } } else if (GregTech_API.mOutputRF && tTileEntity instanceof IEnergyReceiver) { - final ForgeDirection tDirection = - ForgeDirection.getOrientation(i).getOpposite(); + final ForgeDirection tDirection = ForgeDirection.getOrientation(i).getOpposite(); final int rfOut = GT_Utility.safeInt(aVoltage * GregTech_API.mEUtoRF / 100); if (((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, true) == rfOut) { ((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, false); diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java index 936de80b3e..8eb481f150 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java @@ -1,28 +1,31 @@ package gregtech.api.interfaces.tileentity; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + import cofh.api.energy.IEnergyReceiver; import gregtech.api.enums.SubTag; import gregtech.api.util.GT_Utility; import ic2.api.energy.tile.IEnergySink; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; /** * THIS IS GOING TO BE USED IN 1.8 * <p/> * Interface for getting Connected to the GregTech Energy Network. * <p/> - * This is all you need to connect to the GT Network. - * IColoredTileEntity is needed for not connecting differently coloured Blocks to each other. - * IHasWorldObjectAndCoords is needed for the InWorld related Stuff. @BaseTileEntity does implement most of that Interface. + * This is all you need to connect to the GT Network. IColoredTileEntity is needed for not connecting differently + * coloured Blocks to each other. IHasWorldObjectAndCoords is needed for the InWorld related Stuff. @BaseTileEntity does + * implement most of that Interface. */ public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasWorldObjectAndCoords { + /** * Inject Energy Call for Electricity. Gets called by EnergyEmitters to inject Energy into your Block * <p/> * Note: you have to check for @inputEnergyFrom because the Network won't check for that by itself. * - * @param aSide 0 - 5 = Vanilla Directions of YOUR Block the Energy gets inserted to. 6 = No specific Side (don't do Side checks for this Side) + * @param aSide 0 - 5 = Vanilla Directions of YOUR Block the Energy gets inserted to. 6 = No specific Side (don't do + * Side checks for this Side) * @return amount of used Amperes. 0 if not accepted anything. */ long injectEnergy(SubTag aEnergyType, byte aSide, long aPrimary, long aSecondary); @@ -41,6 +44,7 @@ public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasW * Utility for the Network */ class Util { + public static int RF_PER_EU = 4; private static boolean RF_ENERGY = false, IC_ENERGY = false, CHECK_ALL = true; @@ -65,12 +69,13 @@ public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasW } /** - * Emits Energy to the adjacent Blocks. Also compatible with adjacent IC2 TileEntities when electric and RF TileEntities when RedstoneFlux. + * Emits Energy to the adjacent Blocks. Also compatible with adjacent IC2 TileEntities when electric and RF + * TileEntities when RedstoneFlux. * * @return the amount of used secondary value. */ - public static final long emitEnergyToNetwork( - SubTag aEnergyType, long aPrimary, long aSecondary, IExperimentalEnergyTileEntity aEmitter) { + public static final long emitEnergyToNetwork(SubTag aEnergyType, long aPrimary, long aSecondary, + IExperimentalEnergyTileEntity aEmitter) { long rUsedSecondary = 0; checkAvailabilities(); for (byte i = 0, j = 0; i < 6 && aSecondary > rUsedSecondary; i++) @@ -84,24 +89,24 @@ public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasW } rUsedSecondary += ((IExperimentalEnergyTileEntity) tTileEntity) .injectEnergy(aEnergyType, j, aPrimary, aSecondary - rUsedSecondary); - } else if (IC_ENERGY - && aEnergyType == SubTag.ENERGY_ELECTRICITY + } else if (IC_ENERGY && aEnergyType == SubTag.ENERGY_ELECTRICITY && tTileEntity instanceof IEnergySink) { - if (((IEnergySink) tTileEntity) - .acceptsEnergyFrom((TileEntity) aEmitter, ForgeDirection.getOrientation(j))) { - while (aSecondary > rUsedSecondary - && ((IEnergySink) tTileEntity).getDemandedEnergy() > 0 - && ((IEnergySink) tTileEntity) + if (((IEnergySink) tTileEntity) + .acceptsEnergyFrom((TileEntity) aEmitter, ForgeDirection.getOrientation(j))) { + while (aSecondary > rUsedSecondary + && ((IEnergySink) tTileEntity).getDemandedEnergy() > 0 + && ((IEnergySink) tTileEntity) .injectEnergy(ForgeDirection.getOrientation(j), aPrimary, aPrimary) - < aPrimary) rUsedSecondary++; - } - } else if (RF_ENERGY - && aEnergyType == SubTag.ENERGY_REDSTONE_FLUX - && tTileEntity instanceof IEnergyReceiver - && ((IEnergyReceiver) tTileEntity).canConnectEnergy(ForgeDirection.getOrientation(j))) { - rUsedSecondary += ((IEnergyReceiver) tTileEntity) - .receiveEnergy(ForgeDirection.getOrientation(j), (int) aSecondary, false); - } + < aPrimary) + rUsedSecondary++; + } + } else + if (RF_ENERGY && aEnergyType == SubTag.ENERGY_REDSTONE_FLUX + && tTileEntity instanceof IEnergyReceiver + && ((IEnergyReceiver) tTileEntity).canConnectEnergy(ForgeDirection.getOrientation(j))) { + rUsedSecondary += ((IEnergyReceiver) tTileEntity) + .receiveEnergy(ForgeDirection.getOrientation(j), (int) aSecondary, false); + } } return rUsedSecondary; } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java index 713fe73f22..a301c21a76 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces.tileentity; * This File has just internal Information about the Fibre Redstone State of a TileEntity */ public interface IFibreConnected extends IColoredTileEntity, IHasWorldObjectAndCoords { + /** * If this Blocks accepts Fibre from this Side */ diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGearEnergyTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IGearEnergyTileEntity.java index 54fe151cb1..31e9b51719 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGearEnergyTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGearEnergyTileEntity.java @@ -1,15 +1,16 @@ package gregtech.api.interfaces.tileentity; public interface IGearEnergyTileEntity { + /** - * If Rotation Energy can be accepted on this Side. - * This means that the Gear/Axle will connect to this Side, and can cause the Gear/Axle to stop if the Energy isn't accepted. + * If Rotation Energy can be accepted on this Side. This means that the Gear/Axle will connect to this Side, and can + * cause the Gear/Axle to stop if the Energy isn't accepted. */ boolean acceptsRotationalEnergy(byte aSide); /** - * Inject Energy Call for Rotational Energy. - * Rotation Energy can't be stored, this is just for things like internal Dynamos, which convert it into Energy, or into Progress. + * Inject Energy Call for Rotational Energy. Rotation Energy can't be stored, this is just for things like internal + * Dynamos, which convert it into Energy, or into Progress. * * @param aSpeed Positive = Clockwise, Negative = Counterclockwise */ diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java index 221e290220..001ed44825 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java @@ -4,16 +4,17 @@ package gregtech.api.interfaces.tileentity; * You are allowed to include this File in your Download, as i will not change it. */ public interface IGregTechDeviceInformation { + /** - * Is this even a TileEntity which allows GregTech Sensor Kits? - * I need things like this Function for MetaTileEntities, you MUST check this!!! - * Do not assume that it's a Information returning Device, when it just implements this Interface. + * Is this even a TileEntity which allows GregTech Sensor Kits? I need things like this Function for + * MetaTileEntities, you MUST check this!!! Do not assume that it's a Information returning Device, when it just + * implements this Interface. */ boolean isGivingInformation(); /** - * Up to 8 Strings can be returned. - * Note: If you insert "\\\\" in the String it tries to translate seperate Parts of the String instead of the String as a whole. + * Up to 8 Strings can be returned. Note: If you insert "\\\\" in the String it tries to translate seperate Parts of + * the String instead of the String as a whole. * * @return an Array of Information Strings. Don't return null! */ diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java index 16fbe4f327..a561c3ebe1 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java @@ -1,15 +1,9 @@ package gregtech.api.interfaces.tileentity; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.interfaces.IDescribable; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.modularui.IAddInventorySlots; -import gregtech.api.interfaces.modularui.IGetGUITextureSet; -import gregtech.common.blocks.GT_Block_Machines; import java.util.ArrayList; import java.util.List; import java.util.UUID; + import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -18,6 +12,14 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; import net.minecraftforge.fluids.IFluidHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.interfaces.IDescribable; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.modularui.IAddInventorySlots; +import gregtech.api.interfaces.modularui.IGetGUITextureSet; +import gregtech.common.blocks.GT_Block_Machines; + /** * A simple compound Interface for all my TileEntities. * <p/> @@ -25,20 +27,10 @@ import net.minecraftforge.fluids.IFluidHandler; * <p/> * It can cause Problems to include this Interface! */ -public interface IGregTechTileEntity - extends ITexturedTileEntity, - IGearEnergyTileEntity, - ICoverable, - IFluidHandler, - ITurnable, - IGregTechDeviceInformation, - IUpgradableMachine, - IDigitalChest, - IDescribable, - IMachineBlockUpdateable, - IGregtechWailaProvider, - IGetGUITextureSet, - IAddInventorySlots { +public interface IGregTechTileEntity extends ITexturedTileEntity, IGearEnergyTileEntity, ICoverable, IFluidHandler, + ITurnable, IGregTechDeviceInformation, IUpgradableMachine, IDigitalChest, IDescribable, IMachineBlockUpdateable, + IGregtechWailaProvider, IGetGUITextureSet, IAddInventorySlots { + /** * gets the Error displayed on the GUI */ @@ -65,9 +57,9 @@ public interface IGregTechTileEntity IMetaTileEntity getMetaTileEntity(); /** - * Sets the MetaTileEntity. - * Even though this uses the Universal Interface, certain BaseMetaTileEntities only accept one kind of MetaTileEntity - * so only use this if you are sure its the correct one or you will get a Class cast Error. + * Sets the MetaTileEntity. Even though this uses the Universal Interface, certain BaseMetaTileEntities only accept + * one kind of MetaTileEntity so only use this if you are sure its the correct one or you will get a Class cast + * Error. * * @param aMetaTileEntity */ @@ -144,7 +136,8 @@ public interface IGregTechTileEntity ArrayList<ItemStack> getDrops(); - /** Check if the item at the specific index should be dropped or not + /** + * Check if the item at the specific index should be dropped or not * * @param index Index that will be checked * @return True if it should drop, else false @@ -156,14 +149,8 @@ public interface IGregTechTileEntity */ int getLightOpacity(); - void addCollisionBoxesToList( - World aWorld, - int aX, - int aY, - int aZ, - AxisAlignedBB inputAABB, - List<AxisAlignedBB> outputAABB, - Entity collider); + void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, + List<AxisAlignedBB> outputAABB, Entity collider); AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ); @@ -184,8 +171,7 @@ public interface IGregTechTileEntity */ @Override default boolean isMachineBlockUpdateRecursive() { - return !isDead() - && getMetaTileEntity() != null + return !isDead() && getMetaTileEntity() != null && getMetaTileEntity().getBaseMetaTileEntity() == this && getMetaTileEntity().isMachineBlockUpdateRecursive(); } @@ -195,8 +181,8 @@ public interface IGregTechTileEntity } /** - * A randomly called display update to be able to add particles or other items for display - * The event is proxied by the {@link GT_Block_Machines#randomDisplayTick} + * A randomly called display update to be able to add particles or other items for display The event is proxied by + * the {@link GT_Block_Machines#randomDisplayTick} */ @SideOnly(Side.CLIENT) default void onRandomDisplayTick() { diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGregtechWailaProvider.java b/src/main/java/gregtech/api/interfaces/tileentity/IGregtechWailaProvider.java index a463cc91df..19835cd03c 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGregtechWailaProvider.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGregtechWailaProvider.java @@ -1,8 +1,10 @@ package gregtech.api.interfaces.tileentity; import java.util.List; + import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; + import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -10,15 +12,10 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public interface IGregtechWailaProvider { - default void getWailaBody( - ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {} - default void getWailaNBTData( - final EntityPlayerMP player, - final TileEntity tile, - final NBTTagCompound tag, - final World world, - int x, - int y, - int z) {} + default void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, + IWailaConfigHandler config) {} + + default void getWailaNBTData(final EntityPlayerMP player, final TileEntity tile, final NBTTagCompound tag, + final World world, int x, int y, int z) {} } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java b/src/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java index 74ad58c407..bee1756217 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java @@ -18,18 +18,20 @@ public interface IHasInventory extends ISidedInventory, IHasWorldObjectAndCoords boolean isValidSlot(int aIndex); /** - * Tries to add a Stack to the Slot. - * It doesn't matter if the Slot is valid or invalid as described at the Function above. + * Tries to add a Stack to the Slot. It doesn't matter if the Slot is valid or invalid as described at the Function + * above. * - * @return true if aStack == null, then false if aIndex is out of bounds, then false if aStack cannot be added, and then true if aStack has been added + * @return true if aStack == null, then false if aIndex is out of bounds, then false if aStack cannot be added, and + * then true if aStack has been added */ boolean addStackToSlot(int aIndex, ItemStack aStack); /** - * Tries to add X Items of a Stack to the Slot. - * It doesn't matter if the Slot is valid or invalid as described at the Function above. + * Tries to add X Items of a Stack to the Slot. It doesn't matter if the Slot is valid or invalid as described at + * the Function above. * - * @return true if aStack == null, then false if aIndex is out of bounds, then false if aStack cannot be added, and then true if aStack has been added + * @return true if aStack == null, then false if aIndex is out of bounds, then false if aStack cannot be added, and + * then true if aStack has been added */ boolean addStackToSlot(int aIndex, ItemStack aStack, int aAmount); } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java index 7f31d17d11..f02672365e 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java @@ -11,13 +11,16 @@ import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.fluids.IFluidHandler; /** - * This is a bunch of Functions my TileEntities provide, to make life much easier, and to get rid of internal TileEntity stuff. + * This is a bunch of Functions my TileEntities provide, to make life much easier, and to get rid of internal TileEntity + * stuff. * <p/> * This also makes access to adjacent TileEntities more Efficient. * <p/> - * Note: It doesn't have to be a TileEntity in certain cases! And only certain cases, such as the Recipe checking of the findRecipe Function. + * Note: It doesn't have to be a TileEntity in certain cases! And only certain cases, such as the Recipe checking of the + * findRecipe Function. */ public interface IHasWorldObjectAndCoords { + World getWorld(); int getXCoord(); @@ -132,7 +135,8 @@ public interface IHasWorldObjectAndCoords { boolean isDead(); /** - * Sends a Block Event to the Client TileEntity, the byte Parameters are only for validation as Minecraft doesn't properly write Packet Data. + * Sends a Block Event to the Client TileEntity, the byte Parameters are only for validation as Minecraft doesn't + * properly write Packet Data. */ void sendBlockEvent(byte aID, byte aValue); @@ -142,8 +146,8 @@ public interface IHasWorldObjectAndCoords { long getTimer(); /** - * Sets the Light Level of this Block on a Scale of 0 - 15 - * It could be that it doesn't work. This is just for convenience. + * Sets the Light Level of this Block on a Scale of 0 - 15 It could be that it doesn't work. This is just for + * convenience. */ void setLightValue(byte aLightValue); @@ -164,6 +168,7 @@ public interface IHasWorldObjectAndCoords { /** * Opens the GUI with this ID of this MetaTileEntity + * * @deprecated Use ModularUI */ @Deprecated @@ -173,6 +178,7 @@ public interface IHasWorldObjectAndCoords { /** * Opens the GUI with the ID = 0 of this TileEntity + * * @deprecated Use ModularUI */ @Deprecated diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IIC2Enet.java b/src/main/java/gregtech/api/interfaces/tileentity/IIC2Enet.java index 2593f1f3b5..971558c092 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IIC2Enet.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IIC2Enet.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces.tileentity; * IC2 Energy Compat */ public interface IIC2Enet { + /** * Should this tile/block join the ic2 enet */ diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java b/src/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java index b8ce51a212..f772c1ee69 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java @@ -1,16 +1,17 @@ package gregtech.api.interfaces.tileentity; /** - * You are allowed to include this File in your Download, as i will not change it. - * Simple Interface for Machines, which need my Machine Blocks for MultiBlockStructures. + * You are allowed to include this File in your Download, as i will not change it. Simple Interface for Machines, which + * need my Machine Blocks for MultiBlockStructures. * <p/> * Every Machine implementing this Interface will conduct Machine updates. */ public interface IMachineBlockUpdateable { + /** - * The Machine Update, which is called when the Machine needs an Update of its Parts. - * I suggest to wait 1-5 seconds before actually checking the Machine Parts. - * RP-Frames could for example cause Problems when you instacheck the Machine Parts. + * The Machine Update, which is called when the Machine needs an Update of its Parts. I suggest to wait 1-5 seconds + * before actually checking the Machine Parts. RP-Frames could for example cause Problems when you instacheck the + * Machine Parts. */ void onMachineBlockUpdate(); diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java b/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java index 54fa90218a..bcd213b4ff 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces.tileentity; * For Machines which have Progress */ public interface IMachineProgress extends IHasWorldObjectAndCoords { + /** * returns the Progress this Machine has made. Warning, this can also be negative! */ @@ -25,8 +26,8 @@ public interface IMachineProgress extends IHasWorldObjectAndCoords { boolean hasThingsToDo(); /** - * returns if the Machine just got enableWorking called after being disabled. - * Used for Translocators, which need to check if they need to transfer immediately. + * returns if the Machine just got enableWorking called after being disabled. Used for Translocators, which need to + * check if they need to transfer immediately. */ boolean hasWorkJustBeenEnabled(); @@ -46,16 +47,15 @@ public interface IMachineProgress extends IHasWorldObjectAndCoords { boolean isAllowedToWork(); /** - * used to control Machines via Redstone Signal Strength by special Covers - * In case of 0 the Machine is very likely doing nothing, or is just not being controlled at all. + * used to control Machines via Redstone Signal Strength by special Covers In case of 0 the Machine is very likely + * doing nothing, or is just not being controlled at all. */ default byte getWorkDataValue() { return 0; } /** - * used to control Machines via Redstone Signal Strength by special Covers - * only Values between 0 and 15! + * used to control Machines via Redstone Signal Strength by special Covers only Values between 0 and 15! */ default void setWorkDataValue(byte aValue) {} @@ -71,7 +71,7 @@ public interface IMachineProgress extends IHasWorldObjectAndCoords { /** * Indicates if the object in question was forced to shut down (i.e. loss of power) - * */ + */ default boolean wasShutdown() { return false; } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java index c7590e98ed..3cc3c6404d 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java @@ -3,6 +3,7 @@ package gregtech.api.interfaces.tileentity; import gregtech.api.interfaces.ITexture; public interface IPipeRenderedTileEntity extends ICoverable, ITexturedTileEntity { + float getThickNess(); byte getConnections(); diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java index fc5aa460bf..fba20ee79d 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces.tileentity; * This File has just internal Information about the Redstone State of a TileEntity */ public interface IRedstoneEmitter extends IHasWorldObjectAndCoords { + /** * gets the Redstone Level the TileEntity should emit to the given Output Side */ @@ -12,8 +13,9 @@ public interface IRedstoneEmitter extends IHasWorldObjectAndCoords { /** * sets the Redstone Level the TileEntity should emit to the given Output Side * <p/> - * Do not use this if ICoverable is implemented. ICoverable has @getInternalOutputRedstoneSignal for Machine internal Output Redstone, so that it doesnt conflict with Cover Redstone. - * This sets the true Redstone Output Signal. Only Cover Behaviors should use it, not MetaTileEntities. + * Do not use this if ICoverable is implemented. ICoverable has @getInternalOutputRedstoneSignal for Machine + * internal Output Redstone, so that it doesnt conflict with Cover Redstone. This sets the true Redstone Output + * Signal. Only Cover Behaviors should use it, not MetaTileEntities. */ void setOutputRedstoneSignal(byte aSide, byte aStrength); @@ -25,8 +27,9 @@ public interface IRedstoneEmitter extends IHasWorldObjectAndCoords { /** * sets the Redstone Level the TileEntity should emit to the given Output Side * <p/> - * Do not use this if ICoverable is implemented. ICoverable has @getInternalOutputRedstoneSignal for Machine internal Output Redstone, so that it doesnt conflict with Cover Redstone. - * This sets the true Redstone Output Signal. Only Cover Behaviors should use it, not MetaTileEntities. + * Do not use this if ICoverable is implemented. ICoverable has @getInternalOutputRedstoneSignal for Machine + * internal Output Redstone, so that it doesnt conflict with Cover Redstone. This sets the true Redstone Output + * Signal. Only Cover Behaviors should use it, not MetaTileEntities. */ void setStrongOutputRedstoneSignal(byte aSide, byte aStrength); diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java index acee525137..d5fb814c52 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java @@ -4,11 +4,13 @@ package gregtech.api.interfaces.tileentity; * This File has just internal Information about the Redstone State of a TileEntity */ public interface IRedstoneReceiver extends IHasWorldObjectAndCoords { + /** * gets the Redstone Level of the TileEntity to the given Input Side * <p/> - * Do not use this if ICoverable is implemented. ICoverable has @getInternalInputRedstoneSignal for Machine internal Input Redstone - * This returns the true incoming Redstone Signal. Only Cover Behaviors should check it, not MetaTileEntities. + * Do not use this if ICoverable is implemented. ICoverable has @getInternalInputRedstoneSignal for Machine internal + * Input Redstone This returns the true incoming Redstone Signal. Only Cover Behaviors should check it, not + * MetaTileEntities. */ byte getInputRedstoneSignal(byte aSide); diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java index 452699a172..1deb5f1d7c 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java @@ -4,14 +4,14 @@ package gregtech.api.interfaces.tileentity; * This File has just internal Information about the Redstone State of a TileEntity */ public interface IRedstoneTileEntity extends IRedstoneEmitter, IRedstoneReceiver { + /** * enables/disables Redstone Output in general. */ void setGenericRedstoneOutput(boolean aOnOff); /** - * Causes a general Block update. - * Sends nothing to Client, just causes a Block Update. + * Causes a general Block update. Sends nothing to Client, just causes a Block Update. */ void issueBlockUpdate(); } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java index fd1600903e..d6024b612e 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java @@ -1,9 +1,11 @@ package gregtech.api.interfaces.tileentity; -import gregtech.api.interfaces.ITexture; import net.minecraft.block.Block; +import gregtech.api.interfaces.ITexture; + public interface ITexturedTileEntity { + /** * @return the Textures rendered by the GT Rendering */ diff --git a/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java b/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java index e05fd44637..e54a85090e 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java @@ -6,6 +6,7 @@ import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; * Implemented by all my Machines. However without any security checks, if the Players are even allowed to rotate it. */ public interface ITurnable { + /** * Get the block's facing. * diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java b/src/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java index cc59a4af34..546ada0c9d 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java @@ -4,6 +4,7 @@ package gregtech.api.interfaces.tileentity; * To access my Machines a bit easier */ public interface IUpgradableMachine extends IMachineProgress { + /** * Accepts Upgrades. Some Machines have an Upgrade Limit. */ |