Encrusted bars can be duplicated on salvage station (they are drops encrusted bar instead steel bar with diamond shard).
Glitch caused by CustomToolHelper.tryDeconstruct method.
public static ItemStack tryDeconstruct(ItemStack newitem, ItemStack mainItem) {
String type = null;
if (newitem != null && newitem.getItem() instanceof ITieredComponent) {
type = ((ITieredComponent) newitem.getItem()).getMaterialType(newitem);
}
if (type != null) {
CustomMaterial primary = CustomToolHelper.getCustomPrimaryMaterial(mainItem);
CustomMaterial secondary = CustomToolHelper.getCustomSecondaryMaterial(mainItem);
if (primary != null && primary.type.equalsIgnoreCase(type)) {
CustomMaterial.addMaterial(newitem, slot_main, primary.name);
} else {
if (secondary != null && secondary.type.equalsIgnoreCase(type)) {
CustomMaterial.addMaterial(newitem, slot_main, secondary.name);
}
}
}
return newitem;
}
I'm don't understand for what used that method, it are just compares two itemstacks and copies material from second to first IS.
Missed logical not operator??
Encrusted bars can be duplicated on salvage station (they are drops encrusted bar instead steel bar with diamond shard). Glitch caused by CustomToolHelper.tryDeconstruct method.
I'm don't understand for what used that method, it are just compares two itemstacks and copies material from second to first IS. Missed logical not operator??