diff options
author | Glease <4586901+Glease@users.noreply.github.com> | 2023-01-02 16:22:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-02 09:22:37 +0100 |
commit | e30abbb03c2af80a00d2036808d3125c58331b19 (patch) | |
tree | 40be9db1033b6b3a1cbf3f0b49ad85ea504e58fd /src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java | |
parent | 744834083d4504108be1715d36acd94d71c31a84 (diff) | |
download | GT5-Unofficial-e30abbb03c2af80a00d2036808d3125c58331b19.tar.gz GT5-Unofficial-e30abbb03c2af80a00d2036808d3125c58331b19.tar.bz2 GT5-Unofficial-e30abbb03c2af80a00d2036808d3125c58331b19.zip |
add callhook for pre block destroy (#1625)
* add callhook for pre block destroy
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
* spotless
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index 8c6076a56e..f2da90cde9 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -2235,6 +2235,11 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity } @Override + public void onBlockDestroyed() { + if (canAccessData()) getMetaTileEntity().onBlockDestroyed(); + } + + @Override public boolean isUniversalEnergyStored(long aEnergyAmount) { if (getUniversalEnergyStored() >= aEnergyAmount) return true; mHasEnoughEnergy = false; |