made a few changes
This commit is contained in:
parent
629e71f220
commit
8dcaf75f13
@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.0.0
|
mod_version = 1.0.0
|
||||||
maven_group = com.refsonyak.griegtech
|
maven_group = com.refsonyak.griegtech.group
|
||||||
archives_base_name = griegtech-mod
|
archives_base_name = griegtech-mod
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
public class config {
|
|
||||||
public static class DragonArmor {
|
|
||||||
public static final int[] BASE_DURABILITY = new int[] {17, 19, 20, 15};
|
|
||||||
private static final int[] PROTECTION_VALUES = new int[] {5, 8, 10, 5};
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
package net.fabricmc.example;
|
|
||||||
|
|
||||||
import net.fabricmc.config;
|
|
||||||
|
|
||||||
public class DragonArmorMaterial implements ArmorMaterial {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getDurability(EquipmentSlot slot) {
|
|
||||||
return config.DragonArmor.BASE_DURABILITY[slot.getEntitySlotId()] * ;
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,31 @@
|
|||||||
|
package net.fabricmc.example;
|
||||||
|
|
||||||
|
import net.fabricmc.config;
|
||||||
|
|
||||||
|
public class GlitchedArmorMaterial implements ArmorMaterial {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDurability(EquipmentSlot slot) {
|
||||||
|
return config.GlitchedArmor.BASE_DURABILITY[slot.getEntitySlotId()];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getProtectionAmount(EquipmentSlot slot) {
|
||||||
|
return config.GlitchedArmor.PROTECTION_VALUES[slot.getEntitySlotId()];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getEnchantability() {
|
||||||
|
return config.GlitchedArmor.ENCHANTABILITY;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SoundEvent getEquipSound() {
|
||||||
|
return SoundEvents.ITEM_ARMOR_EQUIP_LEATHER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ingredient getRepairIngredient() {
|
||||||
|
return Ingredient.ofItems(RegisterItems.);
|
||||||
|
}
|
||||||
|
}
|
7
src/main/java/net/fabricmc/example/Config.java
Normal file
7
src/main/java/net/fabricmc/example/Config.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
public class config {
|
||||||
|
public static class GlitchedArmor {
|
||||||
|
public static final int[] BASE_DURABILITY = new int[] {17, 19, 20, 15};
|
||||||
|
public static final int[] PROTECTION_VALUES = new int[] {5, 8, 10, 5};
|
||||||
|
public static final int ENCHANTABILITY = 50;
|
||||||
|
}
|
||||||
|
}
|
13
src/main/java/net/fabricmc/example/RegisterItems.java
Normal file
13
src/main/java/net/fabricmc/example/RegisterItems.java
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
public class RegisterItems {
|
||||||
|
public static final ArmorMaterial GlitchArmorMaterial = new CustomArmorMaterial();
|
||||||
|
public static final Item GLITCH_MATERIAL = new CustomMaterialItem(new Item.Settings().group(GriegTech.GRIEGTECH_GROUP));
|
||||||
|
// If you made a new material, this is where you would note it.
|
||||||
|
public static final Item CUSTOM_MATERIAL_HELMET = new ArmorItem(CustomArmorMaterial,
|
||||||
|
EquipmentSlot.HEAD, new Item.Settings().group(ExampleMod.EXAMPLE_MOD_GROUP));
|
||||||
|
public static final Item CUSTOM_MATERIAL_CHESTPLATE = new ArmorItem(CustomArmorMaterial,
|
||||||
|
EquipmentSlot.CHEST, new Item.Settings().group(ExampleMod.EXAMPLE_MOD_GROUP));
|
||||||
|
public static final Item CUSTOM_MATERIAL_LEGGINGS = new ArmorItem(CustomArmorMaterial,
|
||||||
|
EquipmentSlot.LEGS, new Item.Settings().group(ExampleMod.EXAMPLE_MOD_GROUP));
|
||||||
|
public static final Item CUSTOM_MATERIAL_BOOTS = new ArmorItem(CustomArmorMaterial,
|
||||||
|
EquipmentSlot.FEET, new Item.Settings().group(ExampleMod.EXAMPLE_MOD_GROUP));
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user