diff options
author | Jordan Byrne <draknyte1@hotmail.com> | 2018-01-08 19:08:13 +1000 |
---|---|---|
committer | Jordan Byrne <draknyte1@hotmail.com> | 2018-01-08 19:08:13 +1000 |
commit | 2b77e70b058ed0a82b3a4a163a04ec5d9ed00c67 (patch) | |
tree | acc168cb6a9f6331252cf5bd24926b46a7a366ee /src/Java/gtPlusPlus/xmod/gregtech/common | |
parent | bcd8344c3732f08e331cf048f1f748c5b55f2812 (diff) | |
download | GT5-Unofficial-2b77e70b058ed0a82b3a4a163a04ec5d9ed00c67.tar.gz GT5-Unofficial-2b77e70b058ed0a82b3a4a163a04ec5d9ed00c67.tar.bz2 GT5-Unofficial-2b77e70b058ed0a82b3a4a163a04ec5d9ed00c67.zip |
+ Added a recipe to craft Mining Explosives.
+ Added missing file. WorldGen_GT.java.
% Tweaked Mining Explosive logic.
% Tweaked entity fuse variable in primed mining explosive.
% Swapped some XSTR's to CSPRNG's.
$ Fixed mining explosives renderer.
$ Fixed Tesla Tower attacking Items on the ground.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_TeslaTower.java | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_TeslaTower.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_TeslaTower.java index 471d30d4d5..a8c60f3d62 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_TeslaTower.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_TeslaTower.java @@ -29,6 +29,8 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.Gregtech import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -308,15 +310,20 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase { if (!((Entity) r).getUniqueID().equals(getOwner())){ if (((Entity) r).isEntityAlive() || r instanceof EntityLiving){ if (((Entity) r).getDistance(this.xLoc, this.yLoc, this.zLoc) <= this.mRange){ - if (!this.mMode){ - mInRange.put(new Pair<Long, Long>(((Entity) r).getUniqueID().getMostSignificantBits(), ((Entity) r).getUniqueID().getLeastSignificantBits()), (Entity) r); + if (r instanceof EntityItem){ + //Do nothing } else { - if (r instanceof EntityPlayer){ + if (!this.mMode){ mInRange.put(new Pair<Long, Long>(((Entity) r).getUniqueID().getMostSignificantBits(), ((Entity) r).getUniqueID().getLeastSignificantBits()), (Entity) r); } + else { + if (r instanceof EntityPlayer){ + mInRange.put(new Pair<Long, Long>(((Entity) r).getUniqueID().getMostSignificantBits(), ((Entity) r).getUniqueID().getLeastSignificantBits()), (Entity) r); + } + } } - } + } } } } @@ -358,10 +365,13 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase { if (f.isEntityAlive() && !f.getUniqueID().equals(getOwner())){ //if (world.canLightningStrikeAt(j1, l1+1, k1)){ - if (isEnergyEnough() && world.addWeatherEffect(new EntityTeslaTowerLightning(world, (double)j1, (double)l1, (double)k1))){ + //if (isEnergyEnough() && world.addWeatherEffect(new EntityTeslaTowerLightning(world, (double)j1, (double)l1, (double)k1))){ + if (isEnergyEnough() && world.addWeatherEffect(new EntityTeslaTowerLightning(world, (double)j1, (double)l1, (double)k1, f, getOwner()))){ + if (f == null || f.isDead || !f.isEntityAlive()){ this.mInRange.remove(new Pair<Long, Long>(f.getUniqueID().getMostSignificantBits(), f.getUniqueID().getLeastSignificantBits())); - this.setEUVar(this.getEUVar()-5000000); } + this.setEUVar(this.getEUVar()-5000000); + } //} } |