mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 04:09:40 +00:00
Fixes a dupe with the crafting halos
adds a check that will be redundant for 99% of items (#29)
This commit is contained in:
1 file changed
+11
-9
@@ -198,15 +198,17 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
ItemStack stackAt = inv.getStackInSlot(i);
|
||||
if(stackAt != null && stack.isItemEqual(stackAt) && ItemStack.areItemStackTagsEqual(stack, stackAt)) {
|
||||
boolean consume = true;
|
||||
|
||||
ItemStack container = stackAt.getItem().getContainerItem(stackAt);
|
||||
if(container != null) {
|
||||
if(container == stackAt)
|
||||
consume = false;
|
||||
else {
|
||||
InventoryHelper.insertItemIntoInventory(inv, container);
|
||||
if(container.stackSize != 0 && player != null)
|
||||
player.dropPlayerItemWithRandomChoice(container, false);
|
||||
if(stackAt.getItem().hasContainerItem()) {
|
||||
//there are monsters in this world that will return false above but not null below
|
||||
ItemStack container = stackAt.getItem().getContainerItem(stackAt);
|
||||
if (container != null) {
|
||||
if (container == stackAt)
|
||||
consume = false;
|
||||
else {
|
||||
InventoryHelper.insertItemIntoInventory(inv, container);
|
||||
if (container.stackSize != 0 && player != null)
|
||||
player.dropPlayerItemWithRandomChoice(container, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user