diff options
| author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2021-03-11 17:43:44 +0100 |
|---|---|---|
| committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2021-03-11 17:43:44 +0100 |
| commit | b359d79f77bb3efd6433c845af0a948975651b9a (patch) | |
| tree | 66dc56504634159891358ebd6d9a9520c3e2c50b /src/main/java/gregtech/common/blocks | |
| parent | e735bc65230bdbf1324d3bd2c9b8602d43bb9050 (diff) | |
| download | GT5-Unofficial-b359d79f77bb3efd6433c845af0a948975651b9a.tar.gz GT5-Unofficial-b359d79f77bb3efd6433c845af0a948975651b9a.tar.bz2 GT5-Unofficial-b359d79f77bb3efd6433c845af0a948975651b9a.zip | |
Implemented Builder Pattern
Diffstat (limited to 'src/main/java/gregtech/common/blocks')
| -rw-r--r-- | src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java | 12 |
1 files changed, 8 insertions, 4 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 b351c23c4e..4a63bef40f 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -11,7 +11,7 @@ import gregtech.api.items.GT_Generic_Block; import gregtech.api.objects.GT_CopiedBlockTexture; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.PositionedWorldEvent; +import gregtech.api.util.WorldSpawnedEventBuilder; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -256,9 +256,13 @@ public class GT_Block_Reinforced extends GT_Generic_Block { 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); - new PositionedWorldEvent<>(world, "game.tnt.primed") - .playSoundAtEntity(entitytntprimed, 1.0F, 1.0F); - + new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder() + .setPitch(1f) + .setVolume(1f) + .setIdentifier("game.tnt.primed") + .setEntity(entitytntprimed) + .setWorld(world) + .run(); world.setBlockToAir(x, y, z); return false; } |
