aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2017-09-20 06:36:18 +0200
committerTechnus <daniel112092@gmail.com>2017-09-26 20:11:43 +0200
commit566e04e2414cddf40696c6cc848c5b16af560851 (patch)
tree43f674db587ae73d3a6b775c6b0e46daf2f42068
parentee7f7e5d068c3d1e654ca42a7ffff2974551623b (diff)
downloadGT5-Unofficial-566e04e2414cddf40696c6cc848c5b16af560851.tar.gz
GT5-Unofficial-566e04e2414cddf40696c6cc848c5b16af560851.tar.bz2
GT5-Unofficial-566e04e2414cddf40696c6cc848c5b16af560851.zip
Add update code in quantum glass
-rw-r--r--src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java b/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java
index 81b6787435..88ad7cfbcb 100644
--- a/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java
+++ b/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java
@@ -10,6 +10,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
import static com.github.technus.tectech.auxiliary.Reference.MODID;
@@ -91,4 +92,18 @@ public final class QuantumGlassBlock extends BlockBase {
GameRegistry.registerBlock(INSTANCE, QuantumGlassItem.class, INSTANCE.getUnlocalizedName());
GregTech_API.registerMachineBlock(INSTANCE, -1);
}
+
+ @Override
+ public void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMeta) {
+ if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
+ GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
+ }
+ }
+
+ @Override
+ public void onBlockAdded(World aWorld, int aX, int aY, int aZ) {
+ if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
+ GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
+ }
+ }
}