From c49b961131ce72da6ec21b2059f457e64df727fe Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 4 Nov 2018 17:48:04 +0100 Subject: [PATCH] fix no two baubles working at the same time, a3 --- build.gradle | 2 +- .../ellpeck/naturesaura/events/ClientEvents.java | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 85e5e906..b8f06e2f 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: 'maven' -version = "a2" +version = "a3" group = "de.ellpeck.naturesaura" archivesBaseName = "NaturesAura" diff --git a/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java b/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java index 5b7dd25b..061ba6cc 100644 --- a/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java +++ b/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java @@ -32,7 +32,6 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.items.IItemHandler; import org.apache.commons.lang3.mutable.MutableInt; -import vazkii.patchouli.api.PatchouliAPI; import java.util.List; @@ -99,13 +98,10 @@ public class ClientEvents { for (int i = 0; i < baubles.getSlots(); i++) { ItemStack slot = baubles.getStackInSlot(i); if (!slot.isEmpty()) { - if (slot.getItem() == ModItems.AURA_CACHE) { + if (slot.getItem() == ModItems.AURA_CACHE) cache = slot; - break; - } else if (slot.getItem() == ModItems.EYE) { + else if (slot.getItem() == ModItems.EYE) eye = slot; - break; - } } } } @@ -114,13 +110,10 @@ public class ClientEvents { for (int i = 0; i < mc.player.inventory.getSizeInventory(); i++) { ItemStack slot = mc.player.inventory.getStackInSlot(i); if (!slot.isEmpty()) { - if (slot.getItem() == ModItems.AURA_CACHE) { + if (slot.getItem() == ModItems.AURA_CACHE) cache = slot; - break; - } else if (slot.getItem() == ModItems.EYE && i <= 8) { + else if (slot.getItem() == ModItems.EYE && i <= 8) eye = slot; - break; - } } } }