Removes disableMaterialLimitation
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
Removes the disableMaterialLimitation option Replaces EnchantmentTarget.BREAKABLE.includes(item) with getMaxDurability(item) > 0 as it seems more generic
This commit is contained in:
@ -23,16 +23,14 @@ public final class SalvageHelper {
|
||||
*
|
||||
* <p>Note: Only items craft-able in a crafting table are salvageable. Netherite gear is therefore not salvageable.</p>
|
||||
*
|
||||
* @param server <p>The server to get recipes from</p>
|
||||
* @param salvagedItem <p>The item stack to salvage</p>
|
||||
* @param ignoredSalvage <p>Any material which should not be returned as part of the salvage.</p>
|
||||
* @param limitationDisabled <p>Whether the repairable item limitation is disabled</p>
|
||||
* @param server <p>The server to get recipes from</p>
|
||||
* @param salvagedItem <p>The item stack to salvage</p>
|
||||
* @param ignoredSalvage <p>Any material which should not be returned as part of the salvage.</p>
|
||||
* @return <p>The items to return to the user, or null if not salvageable</p>
|
||||
*/
|
||||
public static List<ItemStack> getSalvage(Server server, ItemStack salvagedItem, List<Material> ignoredSalvage,
|
||||
boolean limitationDisabled) {
|
||||
public static List<ItemStack> getSalvage(Server server, ItemStack salvagedItem, List<Material> ignoredSalvage) {
|
||||
if (salvagedItem == null || salvagedItem.getAmount() < 1 ||
|
||||
!ItemHelper.isRepairable(salvagedItem, limitationDisabled)) {
|
||||
!ItemHelper.isRepairable(salvagedItem)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user