From aa453431681d51f8e0175612e0ede67158c3e8cf Mon Sep 17 00:00:00 2001 From: Technus Date: Fri, 7 Oct 2016 18:43:14 +0200 Subject: [PATCH] common directory changes from bloodasp code --- src/main/java/gregtech/common/GT_Client.java | 24 ++++++++++--------- .../java/gregtech/common/GT_Pollution.java | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 2ed64941..33222c03 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -214,7 +214,9 @@ public class GT_Client extends GT_Proxy GregTech_API.METATILEENTITIES[i].getStackForm(1L).getTooltip(null, true); i++; } while (true); - } catch (Throwable e) {e.printStackTrace(GT_Log.err);} + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } // super.onPostLoad(); @@ -271,16 +273,21 @@ public class GT_Client extends GT_Proxy } catch (Throwable e) { } } + + @SubscribeEvent + public void receiveRenderSpecialsEvent(net.minecraftforge.client.event.RenderPlayerEvent.Specials.Pre aEvent) { + mCapeRenderer.receiveRenderSpecialsEvent(aEvent); + } @SubscribeEvent public void onPlayerTickEventClient(TickEvent.PlayerTickEvent aEvent) { - if ((!aEvent.player.isDead) && (aEvent.phase == TickEvent.Phase.END) && (aEvent.side.isClient())) { + if ((aEvent.side.isClient()) && (aEvent.phase == TickEvent.Phase.END) && (!aEvent.player.isDead)) { ArrayList tList = new ArrayList(); for (Map.Entry tEntry : GT_Utility.sPlayedSoundMap.entrySet()) { - if (((Integer) tEntry.getValue()).intValue() < 0) { + if (tEntry.getValue().intValue() < 0) {//Integer -> Integer -> int? >_<, fix tList.add(tEntry.getKey()); } else { - tEntry.setValue(Integer.valueOf(((Integer) tEntry.getValue()).intValue() - 1)); + tEntry.setValue(Integer.valueOf(tEntry.getValue().intValue() - 1)); } } GT_PlayedSound tKey; @@ -346,17 +353,12 @@ public class GT_Client extends GT_Proxy } } - @SubscribeEvent - public void receiveRenderSpecialsEvent(net.minecraftforge.client.event.RenderPlayerEvent.Specials.Pre aEvent) { - mCapeRenderer.receiveRenderSpecialsEvent(aEvent); - } - @SubscribeEvent public void onClientTickEvent(cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent aEvent) { if (aEvent.phase == cpw.mods.fml.common.gameevent.TickEvent.Phase.END) { mAnimationTick++; if (mAnimationTick % 50L == 0L) - mAnimationDirection = !mAnimationDirection; + {mAnimationDirection = !mAnimationDirection;} int tDirection = mAnimationDirection ? 1 : -1; for (Iterator i$ = mPosR.iterator(); i$.hasNext(); ) { Materials tMaterial = (Materials) i$.next(); @@ -520,4 +522,4 @@ public class GT_Client extends GT_Proxy else aWorld.playSound(aX, aY, aZ, tString, 3F, tString.startsWith("note.") ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) : 1.0F, false); } -} \ No newline at end of file +} diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index ee6b32de..b3cb94fa 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -1,4 +1,4 @@ - package gregtech.common; +package gregtech.common; import gregtech.GT_Mod; import gregtech.api.objects.XSTR;