aboutsummaryrefslogtreecommitdiff
path: root/main/java/gregtech/common/tileentities/generators
diff options
context:
space:
mode:
authorBlood-Asp <Blood@Asp>2015-05-10 11:23:53 +0200
committerBlood-Asp <Blood@Asp>2015-05-10 11:23:53 +0200
commit1d802999d843e54dfef3ea294e420fd9d8557aa5 (patch)
treeeeb90216b8d5dcdbd02071e37333a9c64276d4c7 /main/java/gregtech/common/tileentities/generators
parenteba3a051ca6f7f65e085c69e382656780ebf1fdb (diff)
downloadGT5-Unofficial-1d802999d843e54dfef3ea294e420fd9d8557aa5.tar.gz
GT5-Unofficial-1d802999d843e54dfef3ea294e420fd9d8557aa5.tar.bz2
GT5-Unofficial-1d802999d843e54dfef3ea294e420fd9d8557aa5.zip
More updates.
Many bugfixes + 5 Tier Pump + API.jar
Diffstat (limited to 'main/java/gregtech/common/tileentities/generators')
-rw-r--r--main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
index c74c04cdb4..6bf553a05c 100644
--- a/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
+++ b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
@@ -9,6 +9,7 @@ import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityEnderCrystal;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.Textures;
@@ -95,12 +96,16 @@ import gregtech.api.util.GT_Utility;
//Energyzed node
if(isThaumcraftLoaded){
try{
- int fire = VisNetHandler.drainVis(this.getBaseMetaTileEntity().getWorld(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), Aspect.FIRE, 1000);
- int earth = VisNetHandler.drainVis(this.getBaseMetaTileEntity().getWorld(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), Aspect.EARTH, 1000);
- int air = VisNetHandler.drainVis(this.getBaseMetaTileEntity().getWorld(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), Aspect.AIR, 1000);
- int destruction = VisNetHandler.drainVis(this.getBaseMetaTileEntity().getWorld(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), Aspect.ENTROPY, 1000);
- int order = VisNetHandler.drainVis(this.getBaseMetaTileEntity().getWorld(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), Aspect.ORDER, 1000);
- int water = VisNetHandler.drainVis(this.getBaseMetaTileEntity().getWorld(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), Aspect.WATER, 1000);
+ World tmpWorld = this.getBaseMetaTileEntity().getWorld();
+ int tmpX = this.getBaseMetaTileEntity().getXCoord();
+ int tmpY = this.getBaseMetaTileEntity().getYCoord();
+ int tmpZ = this.getBaseMetaTileEntity().getZCoord();
+ int fire = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.FIRE, 1000);
+ int earth = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.EARTH, 1000);
+ int air = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.AIR, 1000);
+ int destruction = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.ENTROPY, 1000);
+ int order = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.ORDER, 1000);
+ int water = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.WATER, 1000);
int visEU = (int) (Math.pow(fire, 4)+Math.pow(earth, 4)+Math.pow(air, 4)+Math.pow(destruction, 4)+Math.pow(order, 4)+Math.pow(water, 4));
getBaseMetaTileEntity().increaseStoredEnergyUnits(Math.min(maxEUOutput(), visEU*getEfficiency()/this.sEnergyFromVis), false);
}catch (Throwable e){}
@@ -121,7 +126,9 @@ import gregtech.api.util.GT_Utility;
public boolean hasEgg()
{
- return Blocks.dragon_egg == getBaseMetaTileEntity().getBlockOffset(0, 1, 0);
+ Block above = getBaseMetaTileEntity().getBlockOffset(0, 1, 0);
+ if(above==null||Blocks.air==above){return false;}
+ return Blocks.dragon_egg == above || above.getUnlocalizedName().equals("tile.dragonEgg");
}
/* 43: */
/* 44: */ public int getEfficiency()