diff --git a/gradle.properties b/gradle.properties index eccbc90..627dcce 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=1.20.1+build.10 loader_version=0.15.9 # Mod Properties -mod_version=0.6.2 +mod_version=0.7.0 maven_group=pl.xyundy.squaredadditions archives_base_name=squaredadditions diff --git a/src/main/generated/.cache/9adbe1c44971b18122390f472ecf7bb970889f75 b/src/main/generated/.cache/9adbe1c44971b18122390f472ecf7bb970889f75 index 131814c..347884c 100644 --- a/src/main/generated/.cache/9adbe1c44971b18122390f472ecf7bb970889f75 +++ b/src/main/generated/.cache/9adbe1c44971b18122390f472ecf7bb970889f75 @@ -1,15 +1,19 @@ -// 1.20.1 2024-04-05T08:43:00.272929 Squared Additions/Model Definitions +// 1.20.1 2024-04-14T22:08:45.106714 Squared Additions/Model Definitions 3ceb6fe4e90e966a3f55f5738ca042b18f9a0ca1 assets/squaredadditions/models/block/rose_gold_block.json 6f15bf8607ada3d987a355d2f2a351969840e7e1 assets/squaredadditions/models/item/emerald_sword.json +50f29b18486c5745cb73b05014da722f4b03ba4f assets/squaredadditions/models/item/rose_gold_helmet.json f6d93aff2c2a7ee3e0f25897e8bd9c986ae407d5 assets/squaredadditions/blockstates/rose_gold_block.json cbae0d76c7081cc2a6373ced0f6186dc4551aa9d assets/squaredadditions/models/item/emerald_axe.json 176ad04c6ba42342adc0e6c5fd107be0e63c65b6 assets/squaredadditions/models/item/emerald_hoe.json +12047fd9df8844630b95d8484150f8da8291f3eb assets/squaredadditions/models/item/rose_gold_hoe.json +1dfb1fd2cf649a277202c40ac31e4976fa410b6c assets/squaredadditions/models/item/rose_gold_leggings.json +7e938224de995d5a7b45865c9a3f8181e1c60371 assets/squaredadditions/models/item/rose_gold_boots.json 5dc59b79a3e713f07045de3613f4ed4b3e29befc assets/squaredadditions/models/item/copper_sword.json 0aa7b4259ef0cf273586e6aa78649b2887b01a87 assets/squaredadditions/models/item/rose_gold_ingot.json -12047fd9df8844630b95d8484150f8da8291f3eb assets/squaredadditions/models/item/rose_gold_hoe.json c6e40631f77833c121192098a1fe019f0572a914 assets/squaredadditions/models/item/rose_gold_axe.json 853303f1702ea6f952ad21034610a267e3cd5e1b assets/squaredadditions/models/item/rose_gold_sword.json d78948e974a2e61bfaa7452b3087855095fda779 assets/squaredadditions/models/item/rose_gold_shovel.json +f561fe51b5655850cc8156c04655627423215045 assets/squaredadditions/models/item/rose_gold_chestplate.json 71776dfec5b5f01ce4a9d3b3e000c3bf53bd5bf5 assets/squaredadditions/models/item/copper_shovel.json 39afaac6b756f9390a49ed7cc14c1988f5027523 assets/squaredadditions/models/item/rose_gold_block.json d12673ccac5079afad74fa93feb5535be7cbcb26 assets/squaredadditions/models/item/emerald_shovel.json diff --git a/src/main/generated/assets/squaredadditions/models/item/rose_gold_boots.json b/src/main/generated/assets/squaredadditions/models/item/rose_gold_boots.json new file mode 100644 index 0000000..6f325bf --- /dev/null +++ b/src/main/generated/assets/squaredadditions/models/item/rose_gold_boots.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "squaredadditions:item/rose_gold_boots" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/squaredadditions/models/item/rose_gold_chestplate.json b/src/main/generated/assets/squaredadditions/models/item/rose_gold_chestplate.json new file mode 100644 index 0000000..bb09795 --- /dev/null +++ b/src/main/generated/assets/squaredadditions/models/item/rose_gold_chestplate.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "squaredadditions:item/rose_gold_chestplate" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/squaredadditions/models/item/rose_gold_helmet.json b/src/main/generated/assets/squaredadditions/models/item/rose_gold_helmet.json new file mode 100644 index 0000000..7dd3ab5 --- /dev/null +++ b/src/main/generated/assets/squaredadditions/models/item/rose_gold_helmet.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "squaredadditions:item/rose_gold_helmet" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/squaredadditions/models/item/rose_gold_leggings.json b/src/main/generated/assets/squaredadditions/models/item/rose_gold_leggings.json new file mode 100644 index 0000000..64c01b9 --- /dev/null +++ b/src/main/generated/assets/squaredadditions/models/item/rose_gold_leggings.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "squaredadditions:item/rose_gold_leggings" + } +} \ No newline at end of file diff --git a/src/main/java/pl/xyundy/squaredadditions/datagen/ModModelProvider.java b/src/main/java/pl/xyundy/squaredadditions/datagen/ModModelProvider.java index b1ba099..c496d38 100644 --- a/src/main/java/pl/xyundy/squaredadditions/datagen/ModModelProvider.java +++ b/src/main/java/pl/xyundy/squaredadditions/datagen/ModModelProvider.java @@ -36,5 +36,11 @@ public void generateItemModels(ItemModelGenerator itemModelGenerator) { itemModelGenerator.register(ModItems.ROSE_GOLD_HOE, Models.HANDHELD); itemModelGenerator.register(ModItems.ROSE_GOLD_INGOT, Models.GENERATED); + + itemModelGenerator.register(ModItems.ROSE_GOLD_HELMET, Models.GENERATED); + itemModelGenerator.register(ModItems.ROSE_GOLD_CHESTPLATE, Models.GENERATED); + itemModelGenerator.register(ModItems.ROSE_GOLD_LEGGINGS, Models.GENERATED); + itemModelGenerator.register(ModItems.ROSE_GOLD_BOOTS, Models.GENERATED); + } } \ No newline at end of file diff --git a/src/main/java/pl/xyundy/squaredadditions/item/ModArmorMaterial.java b/src/main/java/pl/xyundy/squaredadditions/item/ModArmorMaterial.java index 2b9810f..eefc81d 100644 --- a/src/main/java/pl/xyundy/squaredadditions/item/ModArmorMaterial.java +++ b/src/main/java/pl/xyundy/squaredadditions/item/ModArmorMaterial.java @@ -1,51 +1,97 @@ package pl.xyundy.squaredadditions.item; +import java.util.EnumMap; +import java.util.function.Supplier; import net.minecraft.item.ArmorItem; import net.minecraft.item.ArmorMaterial; +import net.minecraft.item.ArmorMaterials; import net.minecraft.recipe.Ingredient; import net.minecraft.sound.SoundEvent; +import net.minecraft.sound.SoundEvents; +import net.minecraft.util.Lazy; +import net.minecraft.util.StringIdentifiable; +import net.minecraft.util.Util; +import pl.xyundy.squaredadditions.SquaredAdditions; public enum ModArmorMaterial implements ArmorMaterial { - ; + ROSE_GOLD("rose_gold", 7, Util.make(new EnumMap(ArmorItem.Type.class), map -> { + map.put(ArmorItem.Type.BOOTS, 2); + map.put(ArmorItem.Type.LEGGINGS, 4); + map.put(ArmorItem.Type.CHESTPLATE, 6); + map.put(ArmorItem.Type.HELMET, 3); + }), 25, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 0.0f, 0.0f, () -> Ingredient.ofItems(ModItems.ROSE_GOLD_INGOT)); + + public static final StringIdentifiable.Codec CODEC; + private static final EnumMap BASE_DURABILITY; + private final String name; + private final int durabilityMultiplier; + private final EnumMap protectionAmounts; + private final int enchantability; + private final SoundEvent equipSound; + private final float toughness; + private final float knockbackResistance; + private final Lazy repairIngredientSupplier; + + private ModArmorMaterial(String name, int durabilityMultiplier, EnumMap protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier repairIngredientSupplier) { + this.name = name; + this.durabilityMultiplier = durabilityMultiplier; + this.protectionAmounts = protectionAmounts; + this.enchantability = enchantability; + this.equipSound = equipSound; + this.toughness = toughness; + this.knockbackResistance = knockbackResistance; + this.repairIngredientSupplier = new Lazy(repairIngredientSupplier); + } @Override public int getDurability(ArmorItem.Type type) { - return 0; + return BASE_DURABILITY.get((Object)type) * this.durabilityMultiplier; } @Override public int getProtection(ArmorItem.Type type) { - return 0; + return this.protectionAmounts.get((Object)type); } @Override public int getEnchantability() { - return 0; + return this.enchantability; } @Override public SoundEvent getEquipSound() { - return null; + return this.equipSound; } @Override public Ingredient getRepairIngredient() { - return null; + return this.repairIngredientSupplier.get(); } @Override public String getName() { - return ""; + + return SquaredAdditions.MOD_ID + ":" + this.name; } @Override public float getToughness() { - return 0; + return this.toughness; } @Override public float getKnockbackResistance() { - return 0; + return this.knockbackResistance; + } + + static { + CODEC = StringIdentifiable.createCodec(ArmorMaterials::values); + BASE_DURABILITY = Util.make(new EnumMap(ArmorItem.Type.class), map -> { + map.put(ArmorItem.Type.BOOTS, 13); + map.put(ArmorItem.Type.LEGGINGS, 15); + map.put(ArmorItem.Type.CHESTPLATE, 16); + map.put(ArmorItem.Type.HELMET, 11); + }); } } diff --git a/src/main/java/pl/xyundy/squaredadditions/item/ModItems.java b/src/main/java/pl/xyundy/squaredadditions/item/ModItems.java index 9aabce1..6155866 100644 --- a/src/main/java/pl/xyundy/squaredadditions/item/ModItems.java +++ b/src/main/java/pl/xyundy/squaredadditions/item/ModItems.java @@ -47,6 +47,15 @@ public class ModItems { public static final Item ROSE_GOLD_HOE = registerItem("rose_gold_hoe", new HoeItem(ModToolMaterial.ROSE_GOLD_INGOT, -1, -3.0F, new FabricItemSettings())); + public static final Item ROSE_GOLD_HELMET = registerItem("rose_gold_helmet", + new ArmorItem(ModArmorMaterial.ROSE_GOLD, ArmorItem.Type.HELMET, new FabricItemSettings())); + public static final Item ROSE_GOLD_CHESTPLATE = registerItem("rose_gold_chestplate", + new ArmorItem(ModArmorMaterial.ROSE_GOLD, ArmorItem.Type.CHESTPLATE, new FabricItemSettings())); + public static final Item ROSE_GOLD_LEGGINGS = registerItem("rose_gold_leggings", + new ArmorItem(ModArmorMaterial.ROSE_GOLD, ArmorItem.Type.LEGGINGS, new FabricItemSettings())); + public static final Item ROSE_GOLD_BOOTS = registerItem("rose_gold_boots", + new ArmorItem(ModArmorMaterial.ROSE_GOLD, ArmorItem.Type.BOOTS, new FabricItemSettings())); + private static Item registerItem(String name, Item item) { return Registry.register(Registries.ITEM, new Identifier(SquaredAdditions.MOD_ID, name), item); } @@ -61,6 +70,11 @@ public static void itemGroupCombat(FabricItemGroupEntries entries) { entries.add(ROSE_GOLD_SWORD); entries.add(ROSE_GOLD_AXE); + + entries.add(ROSE_GOLD_HELMET); + entries.add(ROSE_GOLD_CHESTPLATE); + entries.add(ROSE_GOLD_LEGGINGS); + entries.add(ROSE_GOLD_BOOTS); } public static void itemGroupTools(FabricItemGroupEntries entries) { entries.add(COPPER_PICKAXE); diff --git a/src/main/resources/assets/squaredadditions/lang/en_us.json b/src/main/resources/assets/squaredadditions/lang/en_us.json index cb12150..c8a3e8f 100644 --- a/src/main/resources/assets/squaredadditions/lang/en_us.json +++ b/src/main/resources/assets/squaredadditions/lang/en_us.json @@ -21,5 +21,9 @@ "item.squaredadditions.rose_gold_shovel": "Rose Gold Shovel", "item.squaredadditions.rose_gold_hoe": "Rose Gold Hoe", "item.squaredadditions.rose_gold_axe": "Rose Gold Axe", - "item.squaredadditions.rose_gold_pickaxe": "Rose Gold Pickaxe" + "item.squaredadditions.rose_gold_pickaxe": "Rose Gold Pickaxe", + "item.squaredadditions.rose_gold_helmet": "Rose Gold Helmet", + "item.squaredadditions.rose_gold_chestplate": "Rose Gold Chestplate", + "item.squaredadditions.rose_gold_leggings": "Rose Gold Leggings", + "item.squaredadditions.rose_gold_boots": "Rose Gold Boots" } \ No newline at end of file diff --git a/src/main/resources/assets/squaredadditions/lang/pl_pl.json b/src/main/resources/assets/squaredadditions/lang/pl_pl.json index 80eacc7..3f176ba 100644 --- a/src/main/resources/assets/squaredadditions/lang/pl_pl.json +++ b/src/main/resources/assets/squaredadditions/lang/pl_pl.json @@ -22,5 +22,9 @@ "item.squaredadditions.rose_gold_shovel": "Różowozłota Łopata", "item.squaredadditions.rose_gold_hoe": "Różowozłota Motyka", "item.squaredadditions.rose_gold_axe": "Różowozłota Siekiera", - "item.squaredadditions.rose_gold_pickaxe": "Różowozłoty Kilof" + "item.squaredadditions.rose_gold_pickaxe": "Różowozłoty Kilof", + "item.squaredadditions.rose_gold_helmet": "Różowozłoty Hełm", + "item.squaredadditions.rose_gold_chestplate": "Różowozłoty Napierśnik", + "item.squaredadditions.rose_gold_leggings": "Różowozłote Nogawice", + "item.squaredadditions.rose_gold_boots": "Różowozłote Buty" } \ No newline at end of file diff --git a/src/main/resources/assets/squaredadditions/textures/item/rose_gold_boots.png b/src/main/resources/assets/squaredadditions/textures/item/rose_gold_boots.png new file mode 100644 index 0000000..77747c5 Binary files /dev/null and b/src/main/resources/assets/squaredadditions/textures/item/rose_gold_boots.png differ diff --git a/src/main/resources/assets/squaredadditions/textures/item/rose_gold_chestplate.png b/src/main/resources/assets/squaredadditions/textures/item/rose_gold_chestplate.png new file mode 100644 index 0000000..4f44b11 Binary files /dev/null and b/src/main/resources/assets/squaredadditions/textures/item/rose_gold_chestplate.png differ diff --git a/src/main/resources/assets/squaredadditions/textures/item/rose_gold_helmet.png b/src/main/resources/assets/squaredadditions/textures/item/rose_gold_helmet.png new file mode 100644 index 0000000..afe856d Binary files /dev/null and b/src/main/resources/assets/squaredadditions/textures/item/rose_gold_helmet.png differ diff --git a/src/main/resources/assets/squaredadditions/textures/item/rose_gold_leggings.png b/src/main/resources/assets/squaredadditions/textures/item/rose_gold_leggings.png new file mode 100644 index 0000000..b33bdd3 Binary files /dev/null and b/src/main/resources/assets/squaredadditions/textures/item/rose_gold_leggings.png differ diff --git a/src/main/resources/assets/squaredadditions/textures/models/armor/rose_gold_layer_1.png b/src/main/resources/assets/squaredadditions/textures/models/armor/rose_gold_layer_1.png new file mode 100755 index 0000000..a639693 Binary files /dev/null and b/src/main/resources/assets/squaredadditions/textures/models/armor/rose_gold_layer_1.png differ diff --git a/src/main/resources/assets/squaredadditions/textures/models/armor/rose_gold_layer_2.png b/src/main/resources/assets/squaredadditions/textures/models/armor/rose_gold_layer_2.png new file mode 100755 index 0000000..ac8fa8d Binary files /dev/null and b/src/main/resources/assets/squaredadditions/textures/models/armor/rose_gold_layer_2.png differ diff --git a/src/main/resources/data/squaredadditions/recipes/rose_gold_boots.json b/src/main/resources/data/squaredadditions/recipes/rose_gold_boots.json new file mode 100644 index 0000000..35a2f8c --- /dev/null +++ b/src/main/resources/data/squaredadditions/recipes/rose_gold_boots.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + " ", + "# #", + "# #" + ], + "key": { + "#": { + "item": "squaredadditions:rose_gold_ingot" + } + }, + "result": { + "item": "squaredadditions:rose_gold_boots" + } +} \ No newline at end of file diff --git a/src/main/resources/data/squaredadditions/recipes/rose_gold_chestplate.json b/src/main/resources/data/squaredadditions/recipes/rose_gold_chestplate.json new file mode 100644 index 0000000..f2ad44a --- /dev/null +++ b/src/main/resources/data/squaredadditions/recipes/rose_gold_chestplate.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "# #", + "###", + "###" + ], + "key": { + "#": { + "item": "squaredadditions:rose_gold_ingot" + } + }, + "result": { + "item": "squaredadditions:rose_gold_chestplate" + } +} \ No newline at end of file diff --git a/src/main/resources/data/squaredadditions/recipes/rose_gold_helmet.json b/src/main/resources/data/squaredadditions/recipes/rose_gold_helmet.json new file mode 100644 index 0000000..f0af2d1 --- /dev/null +++ b/src/main/resources/data/squaredadditions/recipes/rose_gold_helmet.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "###", + "# #", + " " + ], + "key": { + "#": { + "item": "squaredadditions:rose_gold_ingot" + } + }, + "result": { + "item": "squaredadditions:rose_gold_helmet" + } +} \ No newline at end of file diff --git a/src/main/resources/data/squaredadditions/recipes/rose_gold_leggings.json b/src/main/resources/data/squaredadditions/recipes/rose_gold_leggings.json new file mode 100644 index 0000000..f8eeffb --- /dev/null +++ b/src/main/resources/data/squaredadditions/recipes/rose_gold_leggings.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "###", + "# #", + "# #" + ], + "key": { + "#": { + "item": "squaredadditions:rose_gold_ingot" + } + }, + "result": { + "item": "squaredadditions:rose_gold_leggings" + } +} \ No newline at end of file