diff options
author | John <Techlone@users.noreply.github.com> | 2017-04-16 02:18:17 +0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-16 02:18:17 +0500 |
commit | bd1ca056d63fe0ac2c3a8478c78183eafea92096 (patch) | |
tree | 9c75a11959a6479e27ebc4a6e5818dcc48218e1d /src/main/java/gregtech/common/blocks | |
parent | 88128f31146c9f3fa1f5159fbc1252cb2d79f915 (diff) | |
parent | 2ee3b7e712413604549af3097fda93cbb22a262e (diff) | |
download | GT5-Unofficial-bd1ca056d63fe0ac2c3a8478c78183eafea92096.tar.gz GT5-Unofficial-bd1ca056d63fe0ac2c3a8478c78183eafea92096.tar.bz2 GT5-Unofficial-bd1ca056d63fe0ac2c3a8478c78183eafea92096.zip |
Merge pull request #14 from Blood-Asp/unstable
Update
Diffstat (limited to 'src/main/java/gregtech/common/blocks')
-rw-r--r-- | src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java | 26 | ||||
-rw-r--r-- | src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java | 1 |
2 files changed, 15 insertions, 12 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java index 1dc26088ad..d7a47c0bb6 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -57,7 +57,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Magic Solid Super Fuel"); ItemList.Block_BronzePlate.set(new ItemStack(this.setHardness(60.0f).setResistance(150.0f), 1, 0)); ItemList.Block_IridiumTungstensteel.set(new ItemStack(this.setHardness(200.0f).setResistance(600.0f), 1, 1)); - ItemList.Block_Plascrete.set(new ItemStack(this.setHardness(80.0f).setResistance(350.0f), 1, 2)); + ItemList.Block_Plascrete.set(new ItemStack(this.setHardness(40.0f).setResistance(100.0f), 1, 2)); ItemList.Block_TungstenSteelReinforced.set(new ItemStack(this.setHardness(100.0f).setResistance(400.0f), 1, 3)); ItemList.Block_BrittleCharcoal.set(new ItemStack(this.setHardness(0.5f).setResistance(8.0f), 1, 4)); ItemList.Block_Powderbarrel.set(new ItemStack(this.setHardness(2.5f).setResistance(2.0f), 1, 5)); @@ -79,6 +79,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { public int getHarvestLevel(int aMeta) { if (aMeta == 4||aMeta == 5 || aMeta == 6 || aMeta == 7) return 1; + if (aMeta == 2) return 2; return 4; } @@ -121,7 +122,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { return 200.0F; } if (tMeta == 2) { - return 80.0F; + return 40.0F; } if (tMeta == 3) { return 100.0F; @@ -144,7 +145,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { return 600.0F; } if (tMeta == 2) { - return 350.0F; + return 100.0F; } if (tMeta == 3) { return 400.0F; @@ -214,10 +215,10 @@ public class GT_Block_Reinforced extends GT_Generic_Block { public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z) { - if(world.getBlockMetadata(x, y, z)==5){ - EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x, y, z, player == null ? null : player); + if(!world.isRemote && world.getBlockMetadata(x, y, z)==5){ + EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x + 0.5F, y + 0.5F, z + 0.5F, player); world.spawnEntityInWorld(entitytntprimed); - world.playSoundAtEntity(entitytntprimed, "random.fuse", 1.0F, 1.0F); + world.playSoundAtEntity(entitytntprimed, "game.tnt.primed", 1.0F, 1.0F); world.setBlockToAir(x, y, z); return false; @@ -240,12 +241,13 @@ public class GT_Block_Reinforced extends GT_Generic_Block { } } - public void onBlockDestroyedByExplosion(World world, int x, int y, int z, Explosion explosion) - { - if(!world.isRemote && world.getBlockMetadata(x, y, z)==5){ - EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x, y, z, explosion.getExplosivePlacedBy()); - entitytntprimed.fuse = (world.rand.nextInt(entitytntprimed.fuse / 4) + entitytntprimed.fuse / 8); - world.spawnEntityInWorld(entitytntprimed);} + public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { + if (!world.isRemote && world.getBlockMetadata(x, y, z)==5){ + EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x + 0.5F, y + 0.5F, z + 0.5F, explosion.getExplosivePlacedBy()); + entitytntprimed.fuse = (world.rand.nextInt(entitytntprimed.fuse / 4) + entitytntprimed.fuse / 8); + world.spawnEntityInWorld(entitytntprimed); + } + super.onBlockExploded(world, x, y, z, explosion); } public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer player, int side, float xOffset, float yOffset, float zOffset) diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java index baae25274d..cd133100db 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -147,6 +147,7 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) { + if(this.worldObj == null || blockType==null)return; this.mMetaData = ((short) (int) (this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L)); if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) { this.mMetaData = ((short) (this.mMetaData + 1000)); |