11package muramasa .antimatter .tool .armor ;
22
33import it .unimi .dsi .fastutil .objects .ObjectArrayList ;
4+ import lombok .Getter ;
45import muramasa .antimatter .AntimatterAPI ;
56import muramasa .antimatter .Ref ;
67import muramasa .antimatter .material .IMaterialTag ;
78import muramasa .antimatter .material .Material ;
89import muramasa .antimatter .material .MaterialTags ;
10+ import muramasa .antimatter .registration .IAntimatterObject ;
911import muramasa .antimatter .registration .ISharedAntimatterObject ;
1012import muramasa .antimatter .tool .IAntimatterArmor ;
1113import muramasa .antimatter .util .AntimatterPlatformUtils ;
2628import java .util .Objects ;
2729import java .util .function .Supplier ;
2830
29- public class AntimatterArmorType implements ISharedAntimatterObject {
31+ public class AntimatterArmorType implements IAntimatterObject {
3032 private final String domain , id ;
33+ @ Getter
3134 private final List <Component > tooltip = new ObjectArrayList <>();
35+ @ Getter
3236 private final boolean repairable ;
37+ @ Getter
3338 private final int durabilityFactor , extraArmor ;
39+ @ Getter
3440 private final float extraToughness , extraKnockback ;
41+ @ Getter
3542 private final CreativeModeTab itemGroup ;
43+ @ Getter
3644 private EquipmentSlot slot ;
45+ @ Getter
3746 private SoundEvent event ;
47+ @ Getter
3848 int overlayLayers ;
3949 @ Nullable
4050 private IMaterialTag materialRequirement ;
@@ -69,7 +79,7 @@ public AntimatterArmorType(String domain, String id, int durabilityFactor, int e
6979 public List <IAntimatterArmor > instantiateTools () {
7080 List <IAntimatterArmor > armors = new ArrayList <>();
7181 MaterialTags .ARMOR .all ().forEach (m -> {
72- armors .add (new MaterialArmor (Ref . SHARED_ID , this , m , slot , prepareInstantiation (Ref . SHARED_ID )));
82+ armors .add (new MaterialArmor (domain , this , m , slot , prepareInstantiation (domain )));
7383 });
7484 return armors ;
7585 }
@@ -115,11 +125,8 @@ public AntimatterArmorType setPrimaryRequirement(IMaterialTag tag) {
115125 }
116126
117127 public ItemStack getToolStack (Material primary ) {
118- return Objects .requireNonNull (AntimatterAPI .get (IAntimatterArmor .class , primary .getId () + "_" + id )).asItemStack ();
119- }
120-
121- public List <Component > getTooltip () {
122- return tooltip ;
128+ IAntimatterArmor armor = AntimatterAPI .get (IAntimatterArmor .class , primary .getId () + "_" + id , domain );
129+ return Objects .requireNonNull (armor ).asItemStack ();
123130 }
124131
125132 @ Override
@@ -132,39 +139,4 @@ public String getId() {
132139 return id ;
133140 }
134141
135- public boolean isRepairable () {
136- return repairable ;
137- }
138-
139- public int getOverlayLayers () {
140- return overlayLayers ;
141- }
142-
143- public int getDurabilityFactor () {
144- return durabilityFactor ;
145- }
146-
147- public int getExtraArmor () {
148- return extraArmor ;
149- }
150-
151- public float getExtraToughness () {
152- return extraToughness ;
153- }
154-
155- public float getExtraKnockback () {
156- return extraKnockback ;
157- }
158-
159- public CreativeModeTab getItemGroup () {
160- return itemGroup ;
161- }
162-
163- public EquipmentSlot getSlot () {
164- return slot ;
165- }
166-
167- public SoundEvent getEvent () {
168- return event ;
169- }
170142}
0 commit comments