From ee9b263815abe1e158b057996ce76f33dbf82f1e Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Mon, 18 Feb 2019 22:37:09 +0100 Subject: several fixes: -removeal of Axe for base entites -streamlined single block NaquadahReactor -fixed basegenerator for naquadagen Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> --- .../gregtech/api/interfaces/metatileentity/IMetaTileEntity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/gregtech/api/interfaces/metatileentity') diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java index 1ebeda2895..576b2ca3ca 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java @@ -47,10 +47,10 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand * 9 = BaseMetaPipeEntity, Cutter lvl 1 to dismantle * 10 = BaseMetaPipeEntity, Cutter lvl 2 to dismantle * 11 = BaseMetaPipeEntity, Cutter lvl 3 to dismantle - * 12 = BaseMetaPipeEntity, Axe lvl 0 to dismantle - * 13 = BaseMetaPipeEntity, Axe lvl 1 to dismantle - * 14 = BaseMetaPipeEntity, Axe lvl 2 to dismantle - * 15 = BaseMetaPipeEntity, Axe lvl 3 to dismantle + * 12 = GT++ + * 13 = GT++ + * 14 = GT++ + * 15 = GT++ */ byte getTileEntityBaseType(); -- cgit From 1b7d5e176ec01d7b8fec464371b3e79144fffa8a Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Mon, 15 Jul 2019 19:47:31 -0700 Subject: IC2 ENet compat for GT transformers & GT cables * Fixes every face of ic2 nuclear reactors giving full energy * Should reduce performance concerns from previous ic2 energy compat * Removes Tec's workaround --- .../java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/gregtech/api/interfaces/metatileentity') diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java index 576b2ca3ca..4ed01fd0b3 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java @@ -406,4 +406,6 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand boolean hasAlternativeModeText(); String getAlternativeModeText(); + + boolean shouldJoinIc2Enet(); } \ No newline at end of file -- cgit From 112940c9fc61e578470554bb775471952437e64f Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Mon, 15 Jul 2019 19:57:44 -0700 Subject: spaces --- .../java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/interfaces/metatileentity') diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java index 4ed01fd0b3..e973301395 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java @@ -408,4 +408,4 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand String getAlternativeModeText(); boolean shouldJoinIc2Enet(); -} \ No newline at end of file +} -- cgit From 1922f34f1f8782f160e4808f4f6bb75a50703871 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Tue, 17 Mar 2020 19:12:19 +0100 Subject: Refactored Interfaces Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> --- .../api/interfaces/metatileentity/IConnectable.java | 21 +++++++++++---------- .../interfaces/metatileentity/IMetaTileEntity.java | 6 +++--- .../metatileentity/IMetaTileEntityCable.java | 4 ++-- .../metatileentity/IMetaTileEntityItemPipe.java | 15 ++++++++------- 4 files changed, 24 insertions(+), 22 deletions(-) (limited to 'src/main/java/gregtech/api/interfaces/metatileentity') diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java index 96c03bbd6d..16fe07812f 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java @@ -4,15 +4,16 @@ package gregtech.api.interfaces.metatileentity; * For pipes, wires, and other MetaTiles which need to be decided whether they should connect to the block at each side. */ public interface IConnectable { - /** - * Try to connect to the Block at the specified side - * returns the connection state. Non-positive values for failed, others for succeeded. - */ - public int connect(byte aSide); - /** - * Try to disconnect to the Block at the specified side - */ - public void disconnect(byte aSide); + /** + * Try to connect to the Block at the specified side + * returns the connection state. Non-positive values for failed, others for succeeded. + */ + int connect(byte aSide); - public boolean isConnectedAtSide(int aSide); + /** + * Try to disconnect to the Block at the specified side + */ + void disconnect(byte aSide); + + boolean isConnectedAtSide(int aSide); } diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java index e973301395..a518b3baaf 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java @@ -389,7 +389,7 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand void onColorChangeClient(byte aColor); int getLightOpacity(); - + boolean allowGeneralRedstoneOutput(); void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, Entity collider); @@ -402,9 +402,9 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand * The onCreated Function of the Item Class redirects here */ void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer); - + boolean hasAlternativeModeText(); - + String getAlternativeModeText(); boolean shouldJoinIc2Enet(); diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java index ead9c8bf8f..a7c1209d24 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java @@ -7,9 +7,9 @@ import java.util.HashSet; public interface IMetaTileEntityCable extends IMetaTileEntity { @Deprecated - public long transferElectricity(byte aSide, long aVoltage, long aAmperage, ArrayList aAlreadyPassedTileEntityList); + long transferElectricity(byte aSide, long aVoltage, long aAmperage, ArrayList aAlreadyPassedTileEntityList); - default public long transferElectricity(byte aSide, long aVoltage, long aAmperage, HashSet aAlreadyPassedSet) { + default long transferElectricity(byte aSide, long aVoltage, long aAmperage, HashSet aAlreadyPassedSet) { return transferElectricity(aSide, aVoltage, aAmperage, new ArrayList<>(aAlreadyPassedSet)); } } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java index 7187ccb04b..b61fe99904 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java @@ -10,12 +10,12 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { /** * @return if this Pipe can still be used. */ - public boolean pipeCapacityCheck(); + boolean pipeCapacityCheck(); /** * @return if this Pipe can still be used. */ - public boolean incrementTransferCounter(int aIncrement); + boolean incrementTransferCounter(int aIncrement); /** * Sends an ItemStack from aSender to the adjacent Blocks. @@ -23,7 +23,7 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { * @param aSender the BaseMetaTileEntity sending the Stack. * @return if it was able to send something */ - public boolean sendItemStack(Object aSender); + boolean sendItemStack(Object aSender); /** * Executes the Sending Code for inserting Stacks into the TileEntities. @@ -32,19 +32,19 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { * @param aSide the Side of the PIPE facing the TileEntity. * @return if this Side was allowed to Output into the Block. */ - public boolean insertItemStackIntoTileEntity(Object aSender, byte aSide); + boolean insertItemStackIntoTileEntity(Object aSender, byte aSide); /** * Can be used to make flow control Pipes, like Redpowers Restriction Tubes. * Every normal Pipe returns a Value of 32768, so you can easily insert lower Numbers to set Routing priorities. * Negative Numbers to "suck" Items into a certain direction are also possible. */ - public int getStepSize(); + int getStepSize(); /** * Utility for the Item Network */ - public static class Util { + class Util { /** * @return a List of connected Item Pipes */ @@ -55,7 +55,8 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { IGregTechTileEntity aBaseMetaTileEntity = aMetaTileEntity.getBaseMetaTileEntity(); aMap.put(aMetaTileEntity, aStep); for (byte i = 0, j = 0; i < 6; i++) { - if (aMetaTileEntity instanceof IConnectable && !((IConnectable) aMetaTileEntity).isConnectedAtSide(i)) continue; + if (aMetaTileEntity instanceof IConnectable && !((IConnectable) aMetaTileEntity).isConnectedAtSide(i)) + continue; j = GT_Utility.getOppositeSide(i); if (aSuckItems) { if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) { -- cgit From bd10bd57d3db003f63a7abd59422a27894358355 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Fri, 10 Apr 2020 18:03:14 +0200 Subject: Void miner adjustments (#262) * Added all Ores to Voidminer in DeepDark + removed Infinity Ore Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> * renormalize line endings Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> --- .../interfaces/metatileentity/IConnectable.java | 38 ++-- .../metatileentity/IMetaTileEntityItemPipe.java | 202 ++++++++++----------- 2 files changed, 120 insertions(+), 120 deletions(-) (limited to 'src/main/java/gregtech/api/interfaces/metatileentity') diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java index 16fe07812f..bc822250fd 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java @@ -1,19 +1,19 @@ -package gregtech.api.interfaces.metatileentity; - -/** - * For pipes, wires, and other MetaTiles which need to be decided whether they should connect to the block at each side. - */ -public interface IConnectable { - /** - * Try to connect to the Block at the specified side - * returns the connection state. Non-positive values for failed, others for succeeded. - */ - int connect(byte aSide); - - /** - * Try to disconnect to the Block at the specified side - */ - void disconnect(byte aSide); - - boolean isConnectedAtSide(int aSide); -} +package gregtech.api.interfaces.metatileentity; + +/** + * For pipes, wires, and other MetaTiles which need to be decided whether they should connect to the block at each side. + */ +public interface IConnectable { + /** + * Try to connect to the Block at the specified side + * returns the connection state. Non-positive values for failed, others for succeeded. + */ + int connect(byte aSide); + + /** + * Try to disconnect to the Block at the specified side + */ + void disconnect(byte aSide); + + boolean isConnectedAtSide(int aSide); +} diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java index b61fe99904..f136f4f32b 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java @@ -1,101 +1,101 @@ -package gregtech.api.interfaces.metatileentity; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.util.GT_Utility; - -import java.util.Map; - -public interface IMetaTileEntityItemPipe extends IMetaTileEntity { - /** - * @return if this Pipe can still be used. - */ - boolean pipeCapacityCheck(); - - /** - * @return if this Pipe can still be used. - */ - boolean incrementTransferCounter(int aIncrement); - - /** - * Sends an ItemStack from aSender to the adjacent Blocks. - * - * @param aSender the BaseMetaTileEntity sending the Stack. - * @return if it was able to send something - */ - boolean sendItemStack(Object aSender); - - /** - * Executes the Sending Code for inserting Stacks into the TileEntities. - * - * @param aSender the BaseMetaTileEntity sending the Stack. - * @param aSide the Side of the PIPE facing the TileEntity. - * @return if this Side was allowed to Output into the Block. - */ - boolean insertItemStackIntoTileEntity(Object aSender, byte aSide); - - /** - * Can be used to make flow control Pipes, like Redpowers Restriction Tubes. - * Every normal Pipe returns a Value of 32768, so you can easily insert lower Numbers to set Routing priorities. - * Negative Numbers to "suck" Items into a certain direction are also possible. - */ - int getStepSize(); - - /** - * Utility for the Item Network - */ - class Util { - /** - * @return a List of connected Item Pipes - */ - public static Map scanPipes(IMetaTileEntityItemPipe aMetaTileEntity, Map aMap, long aStep, boolean aSuckItems, boolean aIgnoreCapacity) { - aStep += aMetaTileEntity.getStepSize(); - if (aIgnoreCapacity || aMetaTileEntity.pipeCapacityCheck()) - if (aMap.get(aMetaTileEntity) == null || aMap.get(aMetaTileEntity) > aStep) { - IGregTechTileEntity aBaseMetaTileEntity = aMetaTileEntity.getBaseMetaTileEntity(); - aMap.put(aMetaTileEntity, aStep); - for (byte i = 0, j = 0; i < 6; i++) { - if (aMetaTileEntity instanceof IConnectable && !((IConnectable) aMetaTileEntity).isConnectedAtSide(i)) - continue; - j = GT_Utility.getOppositeSide(i); - if (aSuckItems) { - if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) { - IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i); - if (aBaseMetaTileEntity.getColorization() >= 0) { - byte tColor = tItemPipe.getColorization(); - if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) { - continue; - } - } - if (tItemPipe instanceof BaseMetaPipeEntity) { - IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity(); - if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsOut(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) { - scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity); - } - } - } - } else { - if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) { - IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i); - if (tItemPipe != null) { - if (aBaseMetaTileEntity.getColorization() >= 0) { - byte tColor = tItemPipe.getColorization(); - if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) { - continue; - } - } - if (tItemPipe instanceof BaseMetaPipeEntity) { - IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity(); - if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsIn(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) { - scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity); - } - } - } - } - } - } - } - return aMap; - } - } -} +package gregtech.api.interfaces.metatileentity; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.util.GT_Utility; + +import java.util.Map; + +public interface IMetaTileEntityItemPipe extends IMetaTileEntity { + /** + * @return if this Pipe can still be used. + */ + boolean pipeCapacityCheck(); + + /** + * @return if this Pipe can still be used. + */ + boolean incrementTransferCounter(int aIncrement); + + /** + * Sends an ItemStack from aSender to the adjacent Blocks. + * + * @param aSender the BaseMetaTileEntity sending the Stack. + * @return if it was able to send something + */ + boolean sendItemStack(Object aSender); + + /** + * Executes the Sending Code for inserting Stacks into the TileEntities. + * + * @param aSender the BaseMetaTileEntity sending the Stack. + * @param aSide the Side of the PIPE facing the TileEntity. + * @return if this Side was allowed to Output into the Block. + */ + boolean insertItemStackIntoTileEntity(Object aSender, byte aSide); + + /** + * Can be used to make flow control Pipes, like Redpowers Restriction Tubes. + * Every normal Pipe returns a Value of 32768, so you can easily insert lower Numbers to set Routing priorities. + * Negative Numbers to "suck" Items into a certain direction are also possible. + */ + int getStepSize(); + + /** + * Utility for the Item Network + */ + class Util { + /** + * @return a List of connected Item Pipes + */ + public static Map scanPipes(IMetaTileEntityItemPipe aMetaTileEntity, Map aMap, long aStep, boolean aSuckItems, boolean aIgnoreCapacity) { + aStep += aMetaTileEntity.getStepSize(); + if (aIgnoreCapacity || aMetaTileEntity.pipeCapacityCheck()) + if (aMap.get(aMetaTileEntity) == null || aMap.get(aMetaTileEntity) > aStep) { + IGregTechTileEntity aBaseMetaTileEntity = aMetaTileEntity.getBaseMetaTileEntity(); + aMap.put(aMetaTileEntity, aStep); + for (byte i = 0, j = 0; i < 6; i++) { + if (aMetaTileEntity instanceof IConnectable && !((IConnectable) aMetaTileEntity).isConnectedAtSide(i)) + continue; + j = GT_Utility.getOppositeSide(i); + if (aSuckItems) { + if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) { + IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i); + if (aBaseMetaTileEntity.getColorization() >= 0) { + byte tColor = tItemPipe.getColorization(); + if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) { + continue; + } + } + if (tItemPipe instanceof BaseMetaPipeEntity) { + IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity(); + if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsOut(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) { + scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity); + } + } + } + } else { + if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) { + IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i); + if (tItemPipe != null) { + if (aBaseMetaTileEntity.getColorization() >= 0) { + byte tColor = tItemPipe.getColorization(); + if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) { + continue; + } + } + if (tItemPipe instanceof BaseMetaPipeEntity) { + IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity(); + if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsIn(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) { + scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity); + } + } + } + } + } + } + } + return aMap; + } + } +} -- cgit From 9bef8b3a8a8270db9c289c05c998e71273ca20fc Mon Sep 17 00:00:00 2001 From: Technus Date: Wed, 15 Apr 2020 19:01:06 +0200 Subject: Refactor to fixed thread pool executor Use actually something made for this task... --- .../interfaces/metatileentity/IMetaTileEntity.java | 26 +++++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'src/main/java/gregtech/api/interfaces/metatileentity') diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java index a518b3baaf..f0ca426616 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java @@ -5,6 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGearEnergyTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.interfaces.tileentity.IMachineBlockUpdateable; import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.GT_Config; import net.minecraft.block.Block; @@ -31,7 +32,7 @@ import java.util.List; *

* Don't implement this yourself and expect it to work. Extend @MetaTileEntity itself. */ -public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHandler, IGearEnergyTileEntity { +public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHandler, IGearEnergyTileEntity, IMachineBlockUpdateable { /** * This determines the BaseMetaTileEntity belonging to this MetaTileEntity by using the Meta ID of the Block itself. *

@@ -233,11 +234,6 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand */ boolean isAccessAllowed(EntityPlayer aPlayer); - /** - * When a Machine Update occurs - */ - void onMachineBlockUpdate(); - /** * a Player rightclicks the Machine * Sneaky rightclicks are not getting passed to this! @@ -408,4 +404,22 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand String getAlternativeModeText(); boolean shouldJoinIc2Enet(); + + /** + * 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. + * + * just do stuff since we are already in meta tile... + */ + @Override + void onMachineBlockUpdate(); + + /** + * just return in should recurse since we are already in meta tile... + */ + @Override + default boolean isMachineBlockUpdateRecursive(){ + return true; + } } -- cgit