diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2020-01-13 19:02:58 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2020-01-13 19:02:58 +0000 |
commit | bc630f3a7738e4a495cdc1672949d934f76838e3 (patch) | |
tree | 263bc63824d8db4e0c2f6f333a1ce7c7adbe87ec /src/Java/gtPlusPlus/core/block/general | |
parent | 8a7e602c8cbd1a82cd967fab2989d06e59f99e7a (diff) | |
download | GT5-Unofficial-bc630f3a7738e4a495cdc1672949d934f76838e3.tar.gz GT5-Unofficial-bc630f3a7738e4a495cdc1672949d934f76838e3.tar.bz2 GT5-Unofficial-bc630f3a7738e4a495cdc1672949d934f76838e3.zip |
+ Added Hazmat protection to EMT, Gravisuit and Adv. Solar items. Closes #590.
+ Added a hard crash if materials are not found within GT.
+ Added a check for KekzTech and cached some mod checks.
+ Added pollution/s to Geothermal generators. Fixes #579.
$ Fixed Wither Cages being unbreakable. Fixes #587
$ Fixed centrifuging of logs to Methane. Fixes #595.
Diffstat (limited to 'src/Java/gtPlusPlus/core/block/general')
-rw-r--r-- | src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java b/src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java index ed531cef2d..2210e68e8a 100644 --- a/src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java +++ b/src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java @@ -12,6 +12,8 @@ import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.boss.EntityDragon; import net.minecraft.entity.boss.EntityWither; import net.minecraft.entity.boss.IBossDisplayData; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.world.Explosion; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -105,6 +107,60 @@ public class BlockWitherProof extends Block{ return false; } + @Override + public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { + super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); + } + + @Override + public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World p_149737_2_, int p_149737_3_, int p_149737_4_, int p_149737_5_) { + if (aPlayer != null && aPlayer instanceof EntityPlayerMP) { + return 1f; + } + return -1f; + } + + @Override + public float getExplosionResistance(Entity p_149638_1_) { + return Float.MAX_VALUE; + } + + @Override + public void onBlockClicked(World p_149699_1_, int p_149699_2_, int p_149699_3_, int p_149699_4_, EntityPlayer p_149699_5_) { + super.onBlockClicked(p_149699_1_, p_149699_2_, p_149699_3_, p_149699_4_, p_149699_5_); + } + + @Override + public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { + if ((entity == null) || !entity.isEntityAlive()){ + return; + } + if ((entity instanceof EntityWither) || (entity instanceof EntityDragon) || (entity instanceof IBossDisplayData)){ + return; + } + else { + super.onEntityCollidedWithBlock(world, x, y, z, entity); + } + } + + @Override + public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_) { + super.harvestBlock( p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_); + } + + @Override + public boolean canHarvestBlock(EntityPlayer player, int meta) { + if (player != null && player instanceof EntityPlayerMP) { + return true; + } + return super.canHarvestBlock(player, meta); + } + + @Override + public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) { + return Float.MAX_VALUE; + } + } |