[Feature] Build for 1.19.4
This commit is contained in:
parent
8a8e73348c
commit
55930d73d5
55 changed files with 380 additions and 304 deletions
|
@ -25,10 +25,10 @@ public class BaseArmorItem extends ArmorItem implements ItemModelProvider {
|
|||
|
||||
protected final Multimap<Attribute, AttributeModifier> defaultModifiers;
|
||||
|
||||
public BaseArmorItem(ArmorMaterial material, EquipmentSlot equipmentSlot, Properties settings) {
|
||||
super(material, equipmentSlot, settings);
|
||||
public BaseArmorItem(ArmorMaterial material, Type type, Properties settings) {
|
||||
super(material, type, settings);
|
||||
this.defaultModifiers = HashMultimap.create();
|
||||
UUID uuid = ARMOR_MODIFIER_UUID_PER_SLOT[equipmentSlot.getIndex()];
|
||||
UUID uuid = ARMOR_MODIFIER_UUID_PER_SLOT[type.getSlot().getIndex()];
|
||||
addAttributeModifier(
|
||||
Attributes.ARMOR,
|
||||
new AttributeModifier(uuid, "Armor modifier", getDefense(), AttributeModifier.Operation.ADDITION)
|
||||
|
@ -52,7 +52,7 @@ public class BaseArmorItem extends ArmorItem implements ItemModelProvider {
|
|||
|
||||
@Override
|
||||
public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(EquipmentSlot equipmentSlot) {
|
||||
return equipmentSlot == slot ? defaultModifiers : super.getDefaultAttributeModifiers(equipmentSlot);
|
||||
return equipmentSlot == type.getSlot() ? defaultModifiers : super.getDefaultAttributeModifiers(equipmentSlot);
|
||||
}
|
||||
|
||||
protected void addAttributeModifier(Attribute attribute, AttributeModifier modifier) {
|
||||
|
|
|
@ -49,13 +49,13 @@ public class EquipmentDescription<I extends Item> {
|
|||
if (tool instanceof ShearsItem) {
|
||||
builder.setShape(" #", "# ");
|
||||
} else if (tool instanceof BaseArmorItem bai) {
|
||||
if (bai.getSlot() == EquipmentSlot.FEET) {
|
||||
if (bai.getType().getSlot() == EquipmentSlot.FEET) {
|
||||
builder.setShape("# #", "# #");
|
||||
} else if (bai.getSlot() == EquipmentSlot.HEAD) {
|
||||
} else if (bai.getType().getSlot() == EquipmentSlot.HEAD) {
|
||||
builder.setShape("###", "# #");
|
||||
} else if (bai.getSlot() == EquipmentSlot.CHEST) {
|
||||
} else if (bai.getType().getSlot() == EquipmentSlot.CHEST) {
|
||||
builder.setShape("# #", "###", "###");
|
||||
} else if (bai.getSlot() == EquipmentSlot.LEGS) {
|
||||
} else if (bai.getType().getSlot() == EquipmentSlot.LEGS) {
|
||||
builder.setShape("###", "# #", "# #");
|
||||
} else return true;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue