diff --git a/src/main/java/me/woach/bone/items/BoneSteelBow.java b/src/main/java/me/woach/bone/items/BoneSteelBow.java new file mode 100644 index 0000000..6d29c2a --- /dev/null +++ b/src/main/java/me/woach/bone/items/BoneSteelBow.java @@ -0,0 +1,12 @@ +package me.woach.bone.items; + +import net.fabricmc.fabric.api.item.v1.FabricItemSettings; +import net.minecraft.item.BowItem; +import net.minecraft.util.Rarity; + +public class BoneSteelBow extends BowItem { + public BoneSteelBow() { + super(new FabricItemSettings().maxDamage(512).rarity(Rarity.EPIC)); + } + +} diff --git a/src/main/java/me/woach/bone/items/ItemsRegistry.java b/src/main/java/me/woach/bone/items/ItemsRegistry.java index dcab90a..46d9311 100644 --- a/src/main/java/me/woach/bone/items/ItemsRegistry.java +++ b/src/main/java/me/woach/bone/items/ItemsRegistry.java @@ -16,6 +16,7 @@ import net.minecraft.item.ArmorItem.Type; import net.minecraft.item.AxeItem; import net.minecraft.item.BlockItem; +import net.minecraft.item.BowItem; import net.minecraft.item.HoeItem; import net.minecraft.item.Item; import net.minecraft.item.PickaxeItem; @@ -41,6 +42,7 @@ public enum ItemsRegistry { BONESTEEL_SHOVEL("bonesteel_shovel", () -> ItemBuilder.newToolItem(ShovelItem::new, 1.5F, -3.0F)), BONESTEEL_HOE("bonesteel_hoe", () -> ItemBuilder.newToolItem(HoeItem::new, -1, -1.0F)), BONESTEEL_SWORD("bonesteel_sword", () -> ItemBuilder.newToolItem(SwordItem::new, 3, -2.2F)), + BONESTEEL_BOW("bonesteel_bow", () -> ItemBuilder.newItemBow()), AMETHYST_DUST("amethyst_dust", ItemBuilder::newItemDust), LAPIS_DUST("lapis_dust", ItemBuilder::newItemDust), EMERALD_DUST("emerald_dust", ItemBuilder::newItemDust), @@ -88,6 +90,10 @@ protected static Item newItemDust() { return new Item(new FabricItemSettings().maxCount(16).rarity(Rarity.EPIC)); } + protected static Item newItemBow() { + return new BoneSteelBow(); + } + protected static Item newItemArmor(Type armorType) { return new ArmorItem(new BonesteelArmorMaterial(), armorType, new FabricItemSettings().rarity(Rarity.EPIC)); } @@ -134,6 +140,8 @@ public static Item itemToBonesteelItem(Item equipment) { return ItemsRegistry.BONESTEEL_HOE.get(); if (equipment instanceof SwordItem) return ItemsRegistry.BONESTEEL_SWORD.get(); + if (equipment instanceof BowItem) + return ItemsRegistry.BONESTEEL_BOW.get(); return null; } } diff --git a/src/main/resources/assets/bone/lang/en_us.json b/src/main/resources/assets/bone/lang/en_us.json index 7fd6fed..6d1dc90 100644 --- a/src/main/resources/assets/bone/lang/en_us.json +++ b/src/main/resources/assets/bone/lang/en_us.json @@ -21,6 +21,7 @@ "item.bone.bonesteel_chestplate": "Bonesteel Chestplate", "item.bone.bonesteel_leggings": "Bonesteel Leggings", "item.bone.bonesteel_boots": "Bonesteel Boots", + "item.bone.bonesteel_bow": "Bonesteel Bow", "item.bone.bone": "Bone", "itemGroup.bone.bone": "Bone", "item.bone.tier": "Tier %s", diff --git a/src/main/resources/assets/bone/models/item/bonesteel_bow.json b/src/main/resources/assets/bone/models/item/bonesteel_bow.json new file mode 100644 index 0000000..dcda168 --- /dev/null +++ b/src/main/resources/assets/bone/models/item/bonesteel_bow.json @@ -0,0 +1,28 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "bone:item/bonesteel_bow" + }, + "overrides": [ + { + "predicate": { + "pulling": 1 + }, + "model": "bone:item/bonesteel_bow_pulling_0" + }, + { + "predicate": { + "pulling": 1, + "pull": 0.65 + }, + "model": "bone:item/bonesteel_bow_pulling_1" + }, + { + "predicate": { + "pulling": 1, + "pull": 0.9 + }, + "model": "bone:item/bonesteel_bow_pulling_2" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bone/models/item/bonesteel_bow_pulling_0.json b/src/main/resources/assets/bone/models/item/bonesteel_bow_pulling_0.json new file mode 100644 index 0000000..1adabf9 --- /dev/null +++ b/src/main/resources/assets/bone/models/item/bonesteel_bow_pulling_0.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "bone:item/bonesteel_bow_pulling_0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bone/models/item/bonesteel_bow_pulling_1.json b/src/main/resources/assets/bone/models/item/bonesteel_bow_pulling_1.json new file mode 100644 index 0000000..88b61d9 --- /dev/null +++ b/src/main/resources/assets/bone/models/item/bonesteel_bow_pulling_1.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "bone:item/bonesteel_bow_pulling_1" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bone/models/item/bonesteel_bow_pulling_2.json b/src/main/resources/assets/bone/models/item/bonesteel_bow_pulling_2.json new file mode 100644 index 0000000..197d5eb --- /dev/null +++ b/src/main/resources/assets/bone/models/item/bonesteel_bow_pulling_2.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "bone:item/bonesteel_bow_pulling_2" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bone/textures/item/bonesteel_bow.png b/src/main/resources/assets/bone/textures/item/bonesteel_bow.png new file mode 100644 index 0000000..a22695b Binary files /dev/null and b/src/main/resources/assets/bone/textures/item/bonesteel_bow.png differ diff --git a/src/main/resources/assets/bone/textures/item/bonesteel_bow_pulling_0.png b/src/main/resources/assets/bone/textures/item/bonesteel_bow_pulling_0.png new file mode 100644 index 0000000..48ad944 Binary files /dev/null and b/src/main/resources/assets/bone/textures/item/bonesteel_bow_pulling_0.png differ diff --git a/src/main/resources/assets/bone/textures/item/bonesteel_bow_pulling_1.png b/src/main/resources/assets/bone/textures/item/bonesteel_bow_pulling_1.png new file mode 100644 index 0000000..8f25e56 Binary files /dev/null and b/src/main/resources/assets/bone/textures/item/bonesteel_bow_pulling_1.png differ diff --git a/src/main/resources/assets/bone/textures/item/bonesteel_bow_pulling_2.png b/src/main/resources/assets/bone/textures/item/bonesteel_bow_pulling_2.png new file mode 100644 index 0000000..8958b18 Binary files /dev/null and b/src/main/resources/assets/bone/textures/item/bonesteel_bow_pulling_2.png differ diff --git a/src/main/resources/data/bone/tags/items/can_boneforge.json b/src/main/resources/data/bone/tags/items/can_boneforge.json index 937cf38..7cf75aa 100644 --- a/src/main/resources/data/bone/tags/items/can_boneforge.json +++ b/src/main/resources/data/bone/tags/items/can_boneforge.json @@ -19,6 +19,7 @@ "bone:bonesteel_helmet", "bone:bonesteel_chestplate", "bone:bonesteel_leggings", - "bone:bonesteel_boots" + "bone:bonesteel_boots", + "bone:bonesteel_bow" ] } \ No newline at end of file diff --git a/src/main/resources/data/minecraft/recipes/bow.json b/src/main/resources/data/minecraft/recipes/bow.json deleted file mode 100644 index 00e703f..0000000 --- a/src/main/resources/data/minecraft/recipes/bow.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " TS", - "I S", - " TS" - ], - "key": { - "S": { - "item": "minecraft:string" - }, - "T": { - "item": "minecraft:stick" - }, - "I": { - "item": "minecraft:iron_ingot" - } - }, - "result": { - "item": "minecraft:bow", - "count": 1 - } -} \ No newline at end of file