mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 06:36:45 +01:00
Add failsafes to Salvageables
This commit is contained in:
parent
cc1eae150a
commit
06bf814fcf
@ -30,11 +30,11 @@ public class Salvageable {
|
||||
this.salvagedItemMaterial = salvagedItemMaterial;
|
||||
this.salvageItemType = ItemUtils.determineItemType(itemMaterial);
|
||||
this.salvageItemMaterialCategory = ItemUtils.determineMaterialType(salvagedItemMaterial);
|
||||
this.minimumLevel = minimumLevel;
|
||||
this.maximumQuantity = maximumQuantity;
|
||||
this.minimumLevel = Math.max(0, minimumLevel);
|
||||
this.maximumQuantity = Math.max(1, maximumQuantity);
|
||||
this.maximumDurability = itemMaterial.getMaxDurability();
|
||||
this.baseSalvageDurability = (short) (maximumDurability / maximumQuantity);
|
||||
this.xpMultiplier = 1.0D;
|
||||
this.xpMultiplier = Math.max(0, 1.0D);
|
||||
}
|
||||
|
||||
public Material getItemMaterial() {
|
||||
|
Loading…
Reference in New Issue
Block a user