fix bundles

This commit is contained in:
okx-code
2026-06-06 00:49:21 +01:00
parent 30bb469856
commit b18d221641
2 changed files with 11 additions and 2 deletions

View File

@@ -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());
}

View File

@@ -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) {