aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBlood-Asp <bloodasphendrik@gmail.com>2017-03-26 21:16:22 +0200
committerGitHub <noreply@github.com>2017-03-26 21:16:22 +0200
commit024a5adab1d6d44b6961d37e156e61c093f798a7 (patch)
treeb1084188c5ec0e34971db4c39e61d11b8b0be179 /src
parentaea62155c028b0687dc2fecf1afec95168aa3161 (diff)
parent15db129b1d381045e4eefae8277597cf5a659780 (diff)
downloadGT5-Unofficial-024a5adab1d6d44b6961d37e156e61c093f798a7.tar.gz
GT5-Unofficial-024a5adab1d6d44b6961d37e156e61c093f798a7.tar.bz2
GT5-Unofficial-024a5adab1d6d44b6961d37e156e61c093f798a7.zip
Merge pull request #981 from dohyun22/patch-1
Fixed various Bugs on the Powderbarrel.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java19
1 files changed, 10 insertions, 9 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 860760a789..d7a47c0bb6 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
@@ -215,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;
@@ -241,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)