diff options
author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2021-03-10 18:21:44 +0100 |
---|---|---|
committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2021-03-10 18:21:44 +0100 |
commit | f03e907ac73d92bfaf5948e1cae7848675439497 (patch) | |
tree | 194d69bd2c9e62813da4c74e49ba7ab968c79bc6 /src/main/java/gregtech/common/GT_Proxy.java | |
parent | 2d7fe3783011c605a90cf48c04bb575e0e75a72b (diff) | |
download | GT5-Unofficial-f03e907ac73d92bfaf5948e1cae7848675439497.tar.gz GT5-Unofficial-f03e907ac73d92bfaf5948e1cae7848675439497.tar.bz2 GT5-Unofficial-f03e907ac73d92bfaf5948e1cae7848675439497.zip |
Refactor World Events
World events have way to many parameters, so the code gets unreadable, this commit fixes that behavior.
Diffstat (limited to 'src/main/java/gregtech/common/GT_Proxy.java')
-rw-r--r-- | src/main/java/gregtech/common/GT_Proxy.java | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index e4e3592eb3..e34ae1cada 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -33,22 +33,8 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Item; import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.objects.GT_ChunkManager; -import gregtech.api.objects.GT_Fluid; -import gregtech.api.objects.GT_FluidStack; -import gregtech.api.objects.GT_UO_DimensionList; -import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_CLS_Compat; -import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_RecipeRegistrator; -import gregtech.api.util.GT_Shaped_Recipe; -import gregtech.api.util.GT_Shapeless_Recipe; -import gregtech.api.util.GT_Utility; +import gregtech.api.objects.*; +import gregtech.api.util.*; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.gui.GT_ContainerVolumetricFlask; import gregtech.common.gui.GT_GUIContainerVolumetricFlask; @@ -781,8 +767,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { } aEvent.bow.damageItem(1, aEvent.entityPlayer); aEvent.bow.getItem(); - aEvent.entityPlayer.worldObj.playSoundAtEntity(aEvent.entityPlayer, "random.bow", 1.0F, 0.64893958288F + tSpeed - * 0.5F); + + PositionedWorldEvent<String> events = new PositionedWorldEvent<>(aEvent.entityPlayer.worldObj, "random.bow"); + events.playSoundAtEntity(aEvent.entityPlayer, 1.0F, 0.64893958288F + tSpeed * 0.5F); tArrowEntity.canBePickedUp = 1; if (!aEvent.entityPlayer.capabilities.isCreativeMode) { |