diff options
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} */ @SideOnl |
