Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bonesteel bow #15

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/main/java/me/woach/bone/items/BoneSteelBow.java
Original file line number Diff line number Diff line change
@@ -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));
}

}
8 changes: 8 additions & 0 deletions src/main/java/me/woach/bone/items/ItemsRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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),
Expand Down Expand Up @@ -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));
}
Expand Down Expand Up @@ -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;
}
}
1 change: 1 addition & 0 deletions src/main/resources/assets/bone/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
28 changes: 28 additions & 0 deletions src/main/resources/assets/bone/models/item/bonesteel_bow.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "bone:item/bonesteel_bow_pulling_0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "bone:item/bonesteel_bow_pulling_1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "bone:item/bonesteel_bow_pulling_2"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/main/resources/data/bone/tags/items/can_boneforge.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"bone:bonesteel_helmet",
"bone:bonesteel_chestplate",
"bone:bonesteel_leggings",
"bone:bonesteel_boots"
"bone:bonesteel_boots",
"bone:bonesteel_bow"
]
}
23 changes: 0 additions & 23 deletions src/main/resources/data/minecraft/recipes/bow.json

This file was deleted.

Loading