Updated item constructors to simplify usage.
This commit is contained in:
@ -12,8 +12,8 @@ import javax.annotation.ParametersAreNonnullByDefault;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class ChargeItem extends Item {
|
||||
public ChargeItem(Properties properties) {
|
||||
super(properties);
|
||||
public ChargeItem(Rarity rarity, boolean isFireResistant) {
|
||||
super(createProperties(rarity, isFireResistant));
|
||||
}
|
||||
|
||||
public abstract Component getTotemDisplayName();
|
||||
|
||||
@ -6,7 +6,7 @@ import net.minecraft.world.item.Rarity;
|
||||
|
||||
public class DiamondChargeItem extends ChargeItem {
|
||||
public DiamondChargeItem() {
|
||||
super(createProperties(Rarity.RARE, false));
|
||||
super(Rarity.RARE, false);
|
||||
}
|
||||
|
||||
public static String getName() {
|
||||
|
||||
@ -6,7 +6,7 @@ import net.minecraft.world.item.Rarity;
|
||||
|
||||
public class IronChargeItem extends ChargeItem {
|
||||
public IronChargeItem() {
|
||||
super(createProperties(Rarity.COMMON, false));
|
||||
super(Rarity.COMMON, false);
|
||||
}
|
||||
|
||||
public static String getName() {
|
||||
|
||||
@ -6,7 +6,7 @@ import net.minecraft.world.item.Rarity;
|
||||
|
||||
public class NetheriteChargeItem extends ChargeItem {
|
||||
public NetheriteChargeItem() {
|
||||
super(createProperties(Rarity.EPIC, true));
|
||||
super(Rarity.EPIC, true);
|
||||
}
|
||||
|
||||
public static String getName() {
|
||||
|
||||
@ -6,7 +6,7 @@ import net.minecraft.world.item.Rarity;
|
||||
|
||||
public class StrawChargeItem extends ChargeItem {
|
||||
public StrawChargeItem() {
|
||||
super(createProperties(Rarity.UNCOMMON, false));
|
||||
super(Rarity.UNCOMMON, false);
|
||||
}
|
||||
|
||||
public static String getName() {
|
||||
|
||||
@ -7,7 +7,7 @@ import net.minecraft.world.item.Rarity;
|
||||
|
||||
public class DiamondTotemItem extends TotemItem {
|
||||
public DiamondTotemItem() {
|
||||
super(createProperties(Rarity.RARE, false));
|
||||
super(Rarity.RARE, false);
|
||||
}
|
||||
|
||||
public static String getName() {
|
||||
|
||||
@ -7,7 +7,7 @@ import net.minecraft.world.item.Rarity;
|
||||
|
||||
public class IronTotemItem extends TotemItem {
|
||||
public IronTotemItem() {
|
||||
super(createProperties(Rarity.COMMON, false));
|
||||
super(Rarity.COMMON, false);
|
||||
}
|
||||
|
||||
public static String getName() {
|
||||
|
||||
@ -7,7 +7,7 @@ import net.minecraft.world.item.Rarity;
|
||||
|
||||
public class NetheriteTotemItem extends TotemItem {
|
||||
public NetheriteTotemItem() {
|
||||
super(createProperties(Rarity.EPIC, true));
|
||||
super(Rarity.EPIC, true);
|
||||
}
|
||||
|
||||
public static String getName() {
|
||||
|
||||
@ -7,7 +7,7 @@ import net.minecraft.world.item.Rarity;
|
||||
|
||||
public class StrawTotemItem extends TotemItem {
|
||||
public StrawTotemItem() {
|
||||
super(createProperties(Rarity.UNCOMMON, false));
|
||||
super(Rarity.UNCOMMON, false);
|
||||
}
|
||||
|
||||
public static String getName() {
|
||||
|
||||
@ -34,8 +34,8 @@ import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class TotemItem extends Item {
|
||||
public TotemItem(Properties properties) {
|
||||
super(properties);
|
||||
public TotemItem(Rarity rarity, boolean isFireResistant) {
|
||||
super(createProperties(rarity, isFireResistant));
|
||||
}
|
||||
|
||||
public static Properties createProperties(Rarity rarity, boolean isFireResistant) {
|
||||
|
||||
Reference in New Issue
Block a user