Merge b274f673e2
into 7dbc1ad5d3
This commit is contained in:
commit
2c5479e3cd
|
@ -32,6 +32,7 @@ import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
import static com.Acrobot.Breeze.Utils.StringUtil.getMinecraftCharWidth;
|
import static com.Acrobot.Breeze.Utils.StringUtil.getMinecraftCharWidth;
|
||||||
import static com.Acrobot.Breeze.Utils.StringUtil.getMinecraftStringWidth;
|
import static com.Acrobot.Breeze.Utils.StringUtil.getMinecraftStringWidth;
|
||||||
|
@ -124,8 +125,16 @@ public class MaterialUtil {
|
||||||
if (oneMeta == twoMeta || oneMeta == null || twoMeta == null) {
|
if (oneMeta == twoMeta || oneMeta == null || twoMeta == null) {
|
||||||
return oneMeta == twoMeta;
|
return oneMeta == twoMeta;
|
||||||
}
|
}
|
||||||
Map<String, Object> oneSerMeta = oneMeta.serialize();
|
|
||||||
Map<String, Object> twoSerMeta = twoMeta.serialize();
|
Map<String, Object> oneSerMeta = new HashMap<>(oneMeta.serialize());
|
||||||
|
Map<String, Object> twoSerMeta = new HashMap<>(twoMeta.serialize());
|
||||||
|
if (!Properties.EXCLUDED_ITEM_ATTRIBUTES.isEmpty()) {
|
||||||
|
for (String ignoreKey : Properties.EXCLUDED_ITEM_ATTRIBUTES) {
|
||||||
|
oneSerMeta.remove(ignoreKey);
|
||||||
|
twoSerMeta.remove(ignoreKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (oneSerMeta.equals(twoSerMeta)) {
|
if (oneSerMeta.equals(twoSerMeta)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -340,4 +340,10 @@ public class Properties {
|
||||||
@PrecededBySpace
|
@PrecededBySpace
|
||||||
@ConfigurationComment("Add stock counter to quantity line?")
|
@ConfigurationComment("Add stock counter to quantity line?")
|
||||||
public static boolean USE_STOCK_COUNTER = false;
|
public static boolean USE_STOCK_COUNTER = false;
|
||||||
|
|
||||||
|
@PrecededBySpace
|
||||||
|
@ConfigurationComment("Exclude these enchantments from the similarity check when comparing items")
|
||||||
|
@Parser("StringSet")
|
||||||
|
public static Set<String> EXCLUDED_ITEM_ATTRIBUTES = new LinkedHashSet<>();
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue