mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-15 23:20:44 +00:00
fix bundles
This commit is contained in:
@@ -3,15 +3,17 @@ package com.github.igotyou.FactoryMod.recipes;
|
||||
import com.github.igotyou.FactoryMod.FactoryMod;
|
||||
import com.github.igotyou.FactoryMod.factories.FurnCraftChestFactory;
|
||||
import com.github.igotyou.FactoryMod.utility.MultiInventoryWrapper;
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Tag;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import vg.civcraft.mc.civmodcore.inventory.ClonedInventory;
|
||||
import vg.civcraft.mc.civmodcore.inventory.InventoryUtils;
|
||||
import vg.civcraft.mc.civmodcore.inventory.items.ItemMap;
|
||||
import vg.civcraft.mc.civmodcore.inventory.items.ItemUtils;
|
||||
import vg.civcraft.mc.civmodcore.inventory.items.MetaUtils;
|
||||
|
||||
/**
|
||||
* Used to compact items, which means whole or multiple stacks of an item are reduced to a single lored item, which is stackable to the same stacksize
|
||||
@@ -187,6 +189,9 @@ public class CompactingRecipe extends InputRecipe {
|
||||
is.getItemMeta().getLore().contains(compactedLore))) {
|
||||
return false;
|
||||
}
|
||||
if (Tag.ITEMS_BUNDLES.isTagged(is.getType())) {
|
||||
return false;
|
||||
}
|
||||
return im.getAmount(is) >= getCompactStackSize(is.getType());
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Tag;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
@@ -154,6 +155,9 @@ public class DecompactingRecipe extends InputRecipe {
|
||||
}
|
||||
|
||||
private boolean isDecompactable(ItemStack is) {
|
||||
if (Tag.ITEMS_BUNDLES.isTagged(is.getType())) {
|
||||
return false;
|
||||
}
|
||||
List<String> lore = is.getItemMeta().getLore();
|
||||
if (lore != null) {
|
||||
for (String content : lore) {
|
||||
|
||||
Reference in New Issue
Block a user