Skip to content

Commit

Permalink
Big Swords
Browse files Browse the repository at this point in the history
  • Loading branch information
Starexify committed Aug 12, 2024
1 parent c94c9ad commit e832503
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/generated/resources/assets/big_swords/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"item.big_swords.golden_big_sword": "Golden Big Sword",
"item.big_swords.iron_big_sword": "Iron Big Sword",
"item.big_swords.livingmetal_axe": "Livingmetal Axe",
"item.big_swords.livingmetal_big_sword": "Livingmetal Big Sword",
"item.big_swords.livingmetal_boots": "Livingmetal Boots",
"item.big_swords.livingmetal_chestplate": "Livingmetal Chestplate",
"item.big_swords.livingmetal_helmet": "Livingmetal Helmet",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "big_swords:item/livingmetal_big_sword"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_livingmetal_ingot": {
"conditions": {
"items": [
{
"items": "big_swords:livingmetal_ingot"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "big_swords:livingmetal_big_sword"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_livingmetal_ingot"
]
],
"rewards": {
"recipes": [
"big_swords:livingmetal_big_sword"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"#": {
"item": "big_swords:giant_livingmetal_handle"
},
"X": {
"item": "big_swords:livingmetal_ingot"
}
},
"pattern": [
" XX",
"XXX",
"#X "
],
"result": {
"count": 1,
"id": "big_swords:livingmetal_big_sword"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"big_swords:skull_big_sword",
"big_swords:quartz_big_sword",
"big_swords:obsidian_big_sword",
"big_swords:ender_big_sword"
"big_swords:ender_big_sword",
"big_swords:livingmetal_big_sword"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ protected void registerModels() {
handheldItem(BSItems.QUARTZ_BIG_SWORD.get());
handheldItem(BSItems.OBSIDIAN_BIG_SWORD.get());
handheldItem(BSItems.ENDER_BIG_SWORD.get());
handheldItem(BSItems.LIVINGMETAL_BIG_SWORD.get());
}

private void handheldItem(Item item) {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/net/nova/big_swords/data/LangProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ protected void addTranslations() {
addItem(BSItems.QUARTZ_BIG_SWORD, "Quartz Big Sword");
addItem(BSItems.OBSIDIAN_BIG_SWORD, "Obsidian Big Sword");
addItem(BSItems.ENDER_BIG_SWORD, "Ender Big Sword");
addItem(BSItems.LIVINGMETAL_BIG_SWORD, "Livingmetal Big Sword");

// Creative Tab
add(CreativeTab.BIG_SWORDS_TAB_TITLE, "Big Swords R");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ public void build() {


// Big Swords
basicBigSword(recipeOutput, BSItems.GIANT_WOODEN_STICK.asItem(), ItemTags.PLANKS, BSItems.WOODEN_BIG_SWORD);
basicBigSword(recipeOutput, BSItems.GIANT_WOODEN_STICK.asItem(), ItemTags.STONE_TOOL_MATERIALS, BSItems.STONE_BIG_SWORD);
basicBigSword(recipeOutput, BSItems.GIANT_WOODEN_STICK.asItem(), Items.IRON_INGOT, BSItems.IRON_BIG_SWORD);
basicBigSword(recipeOutput, BSItems.GIANT_WOODEN_STICK.asItem(), Items.GOLD_INGOT, BSItems.GOLDEN_BIG_SWORD);
basicBigSword(recipeOutput, BSItems.GIANT_WOODEN_STICK.asItem(), Items.DIAMOND, BSItems.DIAMOND_BIG_SWORD);
basicBigSword(recipeOutput, BSItems.GIANT_WOODEN_STICK.get(), ItemTags.PLANKS, BSItems.WOODEN_BIG_SWORD);
basicBigSword(recipeOutput, BSItems.GIANT_WOODEN_STICK.get(), ItemTags.STONE_TOOL_MATERIALS, BSItems.STONE_BIG_SWORD);
basicBigSword(recipeOutput, BSItems.GIANT_WOODEN_STICK.get(), Items.IRON_INGOT, BSItems.IRON_BIG_SWORD);
basicBigSword(recipeOutput, BSItems.GIANT_WOODEN_STICK.get(), Items.GOLD_INGOT, BSItems.GOLDEN_BIG_SWORD);
basicBigSword(recipeOutput, BSItems.GIANT_WOODEN_STICK.get(), Items.DIAMOND, BSItems.DIAMOND_BIG_SWORD);
basicBigSword(recipeOutput, Items.BONE, Items.ROTTEN_FLESH, BSItems.PATCHWORK_BIG_SWORD);
basicBigSword(recipeOutput, BSItems.GIANT_LIVINGMETAL_HANDLE.get(), BSItems.LIVINGMETAL_INGOT.get(), BSItems.LIVINGMETAL_BIG_SWORD);

ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, BSItems.SKULL_BIG_SWORD)
.define('#', BSItems.GIANT_WOODEN_STICK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected void addTags(HolderLookup.Provider pProvider) {
tag(Tags.BSItemTags.BIG_SWORDS).add(
BSItems.WOODEN_BIG_SWORD.asItem(), BSItems.STONE_BIG_SWORD.asItem(), BSItems.IRON_BIG_SWORD.asItem(), BSItems.GOLDEN_BIG_SWORD.asItem(),
BSItems.DIAMOND_BIG_SWORD.asItem(), BSItems.NETHERITE_BIG_SWORD.asItem(), BSItems.PATCHWORK_BIG_SWORD.asItem(), BSItems.SKULL_BIG_SWORD.asItem(),
BSItems.QUARTZ_BIG_SWORD.asItem(), BSItems.OBSIDIAN_BIG_SWORD.asItem(), BSItems.ENDER_BIG_SWORD.asItem()
BSItems.QUARTZ_BIG_SWORD.asItem(), BSItems.OBSIDIAN_BIG_SWORD.asItem(), BSItems.ENDER_BIG_SWORD.asItem(), BSItems.LIVINGMETAL_BIG_SWORD.asItem()
);

tag(ItemTags.HEAD_ARMOR).add(BSItems.LIVINGMETAL_HELMET.get());
Expand Down
1 change: 1 addition & 0 deletions src/main/java/net/nova/big_swords/init/BSItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ public class BSItems {
public static DeferredItem<Item> QUARTZ_BIG_SWORD = ITEMS.register("quartz_big_sword", () -> new BigSwordItem(BSTiers.QUARTZ, new Item.Properties().attributes(BigSwordItem.createAttributes(BSTiers.QUARTZ, 5, -2.8F))));
public static DeferredItem<Item> OBSIDIAN_BIG_SWORD = ITEMS.register("obsidian_big_sword", () -> new BigSwordItem(BSTiers.OBSIDIAN, new Item.Properties().attributes(BigSwordItem.createAttributes(BSTiers.OBSIDIAN, 5, -2.8F))));
public static DeferredItem<Item> ENDER_BIG_SWORD = ITEMS.register("ender_big_sword", () -> new BigSwordItem(BSTiers.ENDER, new Item.Properties().attributes(BigSwordItem.createAttributes(BSTiers.ENDER, 5, -2.8F))));
public static DeferredItem<Item> LIVINGMETAL_BIG_SWORD = ITEMS.register("livingmetal_big_sword", () -> new BigSwordItem(BSTiers.LIVINGMETAL, new Item.Properties().attributes(BigSwordItem.createAttributes(BSTiers.LIVINGMETAL, 5, -2.8F))));
}
5 changes: 5 additions & 0 deletions src/main/java/net/nova/big_swords/init/CreativeTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public class CreativeTab {
// Livingmetal Stuff
output.accept(BSBlocks.LIVINGMETAL_BLOCK);
output.accept(BSItems.LIVINGMETAL_INGOT);
output.accept(BSItems.LIVINGMETAL_HELMET);
output.accept(BSItems.LIVINGMETAL_CHESTPLATE);
output.accept(BSItems.LIVINGMETAL_LEGGINGS);
output.accept(BSItems.LIVINGMETAL_BOOTS);
output.accept(BSItems.LIVINGMETAL_SWORD);
output.accept(BSItems.LIVINGMETAL_PICKAXE);
output.accept(BSItems.LIVINGMETAL_AXE);
Expand All @@ -47,6 +51,7 @@ public class CreativeTab {
output.accept(BSItems.QUARTZ_BIG_SWORD);
output.accept(BSItems.OBSIDIAN_BIG_SWORD);
output.accept(BSItems.ENDER_BIG_SWORD);
output.accept(BSItems.LIVINGMETAL_BIG_SWORD);
});

builder.icon(() -> new ItemStack(BSItems.WOODEN_BIG_SWORD.asItem()));
Expand Down
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.

0 comments on commit e832503

Please sign in to comment.