mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-16 12:21:25 +01:00
Trial clearing meta if compare similarity set to false in trading inventory. This is to use Citizens logic instead of Minecraft logic for trade selection
This commit is contained in:
parent
91e4fb10fc
commit
b26f185de2
@ -968,8 +968,13 @@ public class ShopTrait extends Trait {
|
||||
MerchantRecipe recipe = new MerchantRecipe(result.clone(), 100000000);
|
||||
for (NPCShopAction action : item.cost) {
|
||||
if (action instanceof ItemAction) {
|
||||
for (ItemStack stack : ((ItemAction) action).items) {
|
||||
recipe.addIngredient(stack.clone());
|
||||
ItemAction ia = (ItemAction) action;
|
||||
for (ItemStack stack : ia.items) {
|
||||
ItemStack ingredient = stack.clone();
|
||||
if (!ia.compareSimilarity) {
|
||||
ingredient.setItemMeta(Bukkit.getItemFactory().getItemMeta(ingredient.getType()));
|
||||
}
|
||||
recipe.addIngredient(ingredient);
|
||||
if (recipe.getIngredients().size() == 2)
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user