diff options
author | Technus <daniel112092@gmail.com> | 2020-04-15 19:01:06 +0200 |
---|---|---|
committer | Technus <daniel112092@gmail.com> | 2020-04-15 19:01:06 +0200 |
commit | 4f30ef0f1abcb85d05170c769b757c3443e10d2b (patch) | |
tree | 1f7e5fa6ec36725c0e3c5f4897d3c0cdd6217aa5 /src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java | |
parent | 9b05c6573762117ab1b60ef195e8be321b6e2bb8 (diff) | |
download | GT5-Unofficial-4f30ef0f1abcb85d05170c769b757c3443e10d2b.tar.gz GT5-Unofficial-4f30ef0f1abcb85d05170c769b757c3443e10d2b.tar.bz2 GT5-Unofficial-4f30ef0f1abcb85d05170c769b757c3443e10d2b.zip |
Refactor to fixed thread pool executor
Use actually something made for this task...
Diffstat (limited to 'src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java')
-rw-r--r-- | src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java | 26 |
1 files changed, 20 insertions, 6 deletions
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; * <p/> * 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. * <p/> @@ -234,11 +235,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; + } } |