fix no two baubles working at the same time, a3

This commit is contained in:
Ellpeck 2018-11-04 17:48:04 +01:00
parent 321a9ff848
commit c49b961131
2 changed files with 5 additions and 12 deletions

View file

@ -11,7 +11,7 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'maven' apply plugin: 'maven'
version = "a2" version = "a3"
group = "de.ellpeck.naturesaura" group = "de.ellpeck.naturesaura"
archivesBaseName = "NaturesAura" archivesBaseName = "NaturesAura"

View file

@ -32,7 +32,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.mutable.MutableInt;
import vazkii.patchouli.api.PatchouliAPI;
import java.util.List; import java.util.List;
@ -99,13 +98,10 @@ public class ClientEvents {
for (int i = 0; i < baubles.getSlots(); i++) { for (int i = 0; i < baubles.getSlots(); i++) {
ItemStack slot = baubles.getStackInSlot(i); ItemStack slot = baubles.getStackInSlot(i);
if (!slot.isEmpty()) { if (!slot.isEmpty()) {
if (slot.getItem() == ModItems.AURA_CACHE) { if (slot.getItem() == ModItems.AURA_CACHE)
cache = slot; cache = slot;
break; else if (slot.getItem() == ModItems.EYE)
} else if (slot.getItem() == ModItems.EYE) {
eye = slot; eye = slot;
break;
}
} }
} }
} }
@ -114,13 +110,10 @@ public class ClientEvents {
for (int i = 0; i < mc.player.inventory.getSizeInventory(); i++) { for (int i = 0; i < mc.player.inventory.getSizeInventory(); i++) {
ItemStack slot = mc.player.inventory.getStackInSlot(i); ItemStack slot = mc.player.inventory.getStackInSlot(i);
if (!slot.isEmpty()) { if (!slot.isEmpty()) {
if (slot.getItem() == ModItems.AURA_CACHE) { if (slot.getItem() == ModItems.AURA_CACHE)
cache = slot; cache = slot;
break; else if (slot.getItem() == ModItems.EYE && i <= 8)
} else if (slot.getItem() == ModItems.EYE && i <= 8) {
eye = slot; eye = slot;
break;
}
} }
} }
} }