From 2fd7805c1096910a3e1fefcd311eb8864a4bedc8 Mon Sep 17 00:00:00 2001 From: fewizz Date: Sun, 4 Oct 2015 17:24:26 +0300 Subject: [PATCH] Hotfix --- .../emt/common/items/tools/chainsaws/ItemDiamondChainsaw.java | 2 +- .../emt/common/items/tools/chainsaws/ItemStreamChainsaw.java | 2 +- .../emt/common/items/tools/chainsaws/ItemThaumiumChainsaw.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemDiamondChainsaw.java b/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemDiamondChainsaw.java index e113dd7..06be6bc 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemDiamondChainsaw.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemDiamondChainsaw.java @@ -149,7 +149,7 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem { audio.updatePosition(); audio.play(); } - } else if (!flag && audio != null) { + } else if (!flag && audio != null && ((((EntityPlayer)entity).inventory.getCurrentItem() != null && ((EntityPlayer)entity).inventory.getCurrentItem().getItem() != this) || (((EntityPlayer)entity).inventory.getCurrentItem() == null))) { audio.stop(); audio.remove(); audio = null; diff --git a/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemStreamChainsaw.java b/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemStreamChainsaw.java index d310182..dda548d 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemStreamChainsaw.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemStreamChainsaw.java @@ -87,7 +87,7 @@ public class ItemStreamChainsaw extends ItemThaumiumChainsaw { audio.updatePosition(); audio.play(); } - } else if (!flag && audio != null) { + } else if (!flag && audio != null && ((((EntityPlayer)entity).inventory.getCurrentItem() != null && ((EntityPlayer)entity).inventory.getCurrentItem().getItem() != this) || (((EntityPlayer)entity).inventory.getCurrentItem() == null))) { audio.stop(); audio.remove(); audio = null; diff --git a/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemThaumiumChainsaw.java b/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemThaumiumChainsaw.java index 74a6c73..414e322 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemThaumiumChainsaw.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemThaumiumChainsaw.java @@ -41,7 +41,7 @@ public class ItemThaumiumChainsaw extends ItemDiamondChainsaw { audio.updatePosition(); audio.play(); } - } else if (!flag && audio != null) { + } else if (!flag && audio != null && ((((EntityPlayer)entity).inventory.getCurrentItem() != null && ((EntityPlayer)entity).inventory.getCurrentItem().getItem() != this) || (((EntityPlayer)entity).inventory.getCurrentItem() == null))) { audio.stop(); audio.remove(); audio = null;