Add other 4 sets

This commit is contained in:
Azimkin
2025-10-26 14:30:55 +01:00
parent ec74f960a5
commit 5f95d17c63
13 changed files with 5897 additions and 15 deletions

View File

@ -1,5 +1,6 @@
package top.azimkin.militaryarmor;
import net.minecraft.Util;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.item.ArmorItem;
@ -7,15 +8,23 @@ import net.minecraft.world.item.ArmorMaterial;
import net.minecraft.world.item.crafting.Ingredient;
import org.jetbrains.annotations.NotNull;
import java.util.EnumMap;
public class CommonMilitaryArmorMaterial implements ArmorMaterial {
private final EnumMap<ArmorItem.Type, Integer> defenceMap = Util.make(new EnumMap<>(ArmorItem.Type.class), (p_266655_) -> {
p_266655_.put(ArmorItem.Type.BOOTS, 3);
p_266655_.put(ArmorItem.Type.LEGGINGS, 6);
p_266655_.put(ArmorItem.Type.CHESTPLATE, 8);
p_266655_.put(ArmorItem.Type.HELMET, 3);
});
@Override
public int getDurabilityForType(ArmorItem.@NotNull Type type) {
return 0;
return 1000;
}
@Override
public int getDefenseForType(ArmorItem.@NotNull Type type) {
return 0;
return defenceMap.get(type);
}
@Override
@ -40,7 +49,7 @@ public class CommonMilitaryArmorMaterial implements ArmorMaterial {
@Override
public float getToughness() {
return 0;
return 3.0f;
}
@Override

View File

@ -57,8 +57,6 @@ public class MilitaryArmor {
@SubscribeEvent
public void onServerStarting(ServerStartingEvent event) {
// Do something when the server starts
if (event.getServer() instanceof DedicatedServer)
throw new RuntimeException("This mod can be used only on client since this is prototype");
}
// You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent

View File

@ -16,7 +16,6 @@ public final class ModItems {
new Item.Properties().defaultDurability(100),
"vsu_vest_1"
));
public static final RegistryObject<CommonMilitaryArmorItem> VSU_HELMET_1 = ITEMS.register("vsu_helmet_1", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.HELMET,
@ -30,7 +29,6 @@ public final class ModItems {
new Item.Properties().defaultDurability(200),
"vsu_vest_2"
));
public static final RegistryObject<CommonMilitaryArmorItem> VSU_HELMET_2 = ITEMS.register("vsu_helmet_2", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.HELMET,
@ -44,7 +42,6 @@ public final class ModItems {
new Item.Properties().defaultDurability(100),
"rus_vest_1"
));
public static final RegistryObject<CommonMilitaryArmorItem> RUS_HELMET_1 = ITEMS.register("rus_helmet_1", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.HELMET,
@ -58,7 +55,6 @@ public final class ModItems {
new Item.Properties().defaultDurability(200),
"rus_vest_2"
));
public static final RegistryObject<CommonMilitaryArmorItem> RUS_HELMET_2 = ITEMS.register("rus_helmet_2", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.HELMET,
@ -66,6 +62,58 @@ public final class ModItems {
"rus_helmet_2"
));
public static final RegistryObject<CommonMilitaryArmorItem> VEST_1 = ITEMS.register("vest_1", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.CHESTPLATE,
new Item.Properties().defaultDurability(100),
"set_1"
));
public static final RegistryObject<CommonMilitaryArmorItem> HELMET_1 = ITEMS.register("helmet_1", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.HELMET,
new Item.Properties().defaultDurability(100),
"set_1"
));
public static final RegistryObject<CommonMilitaryArmorItem> VEST_2 = ITEMS.register("vest_2", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.CHESTPLATE,
new Item.Properties().defaultDurability(200),
"set_2"
));
public static final RegistryObject<CommonMilitaryArmorItem> HELMET_2 = ITEMS.register("helmet_2", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.HELMET,
new Item.Properties().defaultDurability(200),
"set_2"
));
public static final RegistryObject<CommonMilitaryArmorItem> VEST_3 = ITEMS.register("vest_3", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.CHESTPLATE,
new Item.Properties().defaultDurability(300),
"set_3"
));
public static final RegistryObject<CommonMilitaryArmorItem> HELMET_3 = ITEMS.register("helmet_3", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.HELMET,
new Item.Properties().defaultDurability(300),
"set_3"
));
public static final RegistryObject<CommonMilitaryArmorItem> VEST_4 = ITEMS.register("vest_4", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.CHESTPLATE,
new Item.Properties().defaultDurability(400),
"set_4"
));
public static final RegistryObject<CommonMilitaryArmorItem> HELMET_4 = ITEMS.register("helmet_4", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.HELMET,
new Item.Properties().defaultDurability(400),
"set_4"
));
/*public static final Object VSU_HELMET_1 = ITEMS.register("vsu_helmet_1", () -> new CommonMilitaryArmorItem(
ModArmorMaterials.COMMON_MILITARY,
ArmorItem.Type.CHESTPLATE,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,22 @@
{
"item_group.militaryarmor.main": "Military Armor",
"item.militaryarmor.vsu_helmet_1": "AFU Helmet 1",
"item.militaryarmor.vsu_helmet_2": "AFU Helmet 2",
"item.militaryarmor.vsu_vest_1": "AFU Vest 1",
"item.militaryarmor.vsu_helmet_1": "AFU Helmet 1",
"item.militaryarmor.vsu_vest_2": "AFU Vest 2",
"item.militaryarmor.vsu_helmet_2": "AFU Helmet 2",
"item.militaryarmor.rus_helmet_1": "AFRF Helmet 1",
"item.militaryarmor.rus_helmet_2": "AFRF Helmet 2",
"item.militaryarmor.rus_vest_1": "AFRF Vest 1",
"item.militaryarmor.rus_vest_2": "AFRF Vest 2"
"item.militaryarmor.rus_helmet_1": "AFRF Helmet 1",
"item.militaryarmor.rus_vest_2": "AFRF Vest 2",
"item.militaryarmor.rus_helmet_2": "AFRF Helmet 2",
"item.militaryarmor.vest_1": "Vest 1",
"item.militaryarmor.helmet_1": "Helmet 1",
"item.militaryarmor.vest_2": "Vest 2",
"item.militaryarmor.helmet_2": "Helmet 2",
"item.militaryarmor.vest_3": "Vest 3",
"item.militaryarmor.helmet_3": "Helmet 3",
"item.militaryarmor.vest_4": "Vest 4",
"item.militaryarmor.helmet_4": "Helmet 4"
}

View File

@ -9,5 +9,14 @@
"item.militaryarmor.rus_helmet_1": "ВСРФ шлем 1",
"item.militaryarmor.rus_helmet_2": "ВСРФ шлем 2",
"item.militaryarmor.rus_vest_1": "ВСРФ бронежилет 1",
"item.militaryarmor.rus_vest_2": "ВСРФ бронежилет 2"
"item.militaryarmor.rus_vest_2": "ВСРФ бронежилет 2",
"item.militaryarmor.vest_1": "Бронежилет 1",
"item.militaryarmor.helmet_1": "Шлем 1",
"item.militaryarmor.vest_2": "Бронежилет 2",
"item.militaryarmor.helmet_2": "Шлем 2",
"item.militaryarmor.vest_3": "Бронежилет 3",
"item.militaryarmor.helmet_3": "Шлем 3",
"item.militaryarmor.vest_4": "Бронежилет 4",
"item.militaryarmor.helmet_4": "Шлем 4"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB