use of net.silentchaos512.gear.api.material.modifier.IMaterialModifierType in project Silent-Gear by SilentChaos512.
the class AbstractMaterial method removeEnhancements.
public static IMaterialInstance removeEnhancements(IMaterialInstance material) {
ItemStack stack = material.getItem().copy();
for (IMaterialModifierType modifierType : MaterialModifiers.getTypes()) {
modifierType.removeModifier(stack);
}
EnchantmentHelper.setEnchantments(Collections.emptyMap(), stack);
IMaterial iMaterial = material.get();
if (iMaterial != null) {
return MaterialInstance.of(iMaterial, stack);
} else {
return material;
}
}
Aggregations