From c5dec61351cfa21357c4e411d777ccaab15e71fc Mon Sep 17 00:00:00 2001 From: WayofTime Date: Fri, 8 Jan 2016 21:05:13 -0500 Subject: [PATCH] Added Soul Bow textures and localization, as well as rudimentary function. --- .../bloodmagic/item/soul/ItemSoulBow.java | 44 ++++++++++++++++++ .../bloodmagic/registry/ModItems.java | 8 ++++ .../bloodmagic/registry/ModRecipes.java | 3 -- .../assets/bloodmagic/lang/en_US.lang | 1 + .../bloodmagic/models/item/ItemSoulBow.json | 18 +++++++ .../models/item/ItemSoulBow_pulling_0.json | 18 +++++++ .../models/item/ItemSoulBow_pulling_1.json | 18 +++++++ .../models/item/ItemSoulBow_pulling_2.json | 18 +++++++ .../bloodmagic/textures/items/SoulBow.png | Bin 0 -> 708 bytes .../textures/items/SoulBow_pulling_0.png | Bin 0 -> 712 bytes .../textures/items/SoulBow_pulling_1.png | Bin 0 -> 697 bytes .../textures/items/SoulBow_pulling_2.png | Bin 0 -> 687 bytes 12 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulBow.java create mode 100644 src/main/resources/assets/bloodmagic/models/item/ItemSoulBow.json create mode 100644 src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_0.json create mode 100644 src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_1.json create mode 100644 src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_2.json create mode 100644 src/main/resources/assets/bloodmagic/textures/items/SoulBow.png create mode 100644 src/main/resources/assets/bloodmagic/textures/items/SoulBow_pulling_0.png create mode 100644 src/main/resources/assets/bloodmagic/textures/items/SoulBow_pulling_1.png create mode 100644 src/main/resources/assets/bloodmagic/textures/items/SoulBow_pulling_2.png diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulBow.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulBow.java new file mode 100644 index 00000000..c8d4887d --- /dev/null +++ b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulBow.java @@ -0,0 +1,44 @@ +package WayofTime.bloodmagic.item.soul; + +import net.minecraft.client.resources.model.ModelResourceLocation; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBow; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.bloodmagic.BloodMagic; +import WayofTime.bloodmagic.api.Constants; + +public class ItemSoulBow extends ItemBow +{ + public ItemSoulBow() + { + super(); + setUnlocalizedName(Constants.Mod.MODID + ".soulBow"); + this.setCreativeTab(BloodMagic.tabBloodMagic); + } + + @SideOnly(Side.CLIENT) + public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining) + { + if (player.getItemInUse() == null) + { + return null; + } + + int i = stack.getMaxItemUseDuration() - player.getItemInUseCount(); + + if (i >= 18) + { + return new ModelResourceLocation("bloodmagic:ItemSoulBow_pulling_2", "inventory"); + } else if (i > 13) + { + return new ModelResourceLocation("bloodmagic:ItemSoulBow_pulling_1", "inventory"); + } else if (i > 0) + { + return new ModelResourceLocation("bloodmagic:ItemSoulBow_pulling_0", "inventory"); + } + + return null; + } +} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModItems.java b/src/main/java/WayofTime/bloodmagic/registry/ModItems.java index 40a1f45c..94c23679 100644 --- a/src/main/java/WayofTime/bloodmagic/registry/ModItems.java +++ b/src/main/java/WayofTime/bloodmagic/registry/ModItems.java @@ -47,6 +47,7 @@ import WayofTime.bloodmagic.item.sigil.ItemSigilVoid; import WayofTime.bloodmagic.item.sigil.ItemSigilWater; import WayofTime.bloodmagic.item.sigil.ItemSigilWhirlwind; import WayofTime.bloodmagic.item.soul.ItemMonsterSoul; +import WayofTime.bloodmagic.item.soul.ItemSoulBow; import WayofTime.bloodmagic.item.soul.ItemSoulGem; import WayofTime.bloodmagic.item.soul.ItemSoulSnare; import WayofTime.bloodmagic.item.soul.ItemSoulSword; @@ -117,6 +118,7 @@ public class ModItems public static Item soulSnare; public static Item soulSword; + public static Item soulBow; public static Item.ToolMaterial boundToolMaterial = EnumHelper.addToolMaterial("BoundToolMaterial", 4, 0, 10, 8, 50); public static Item.ToolMaterial soulToolMaterial = EnumHelper.addToolMaterial("SoulToolMaterial", 4, 0, 7, 8, 50); @@ -194,6 +196,7 @@ public class ModItems soulSnare = registerItem(new ItemSoulSnare()); soulSword = registerItem(new ItemSoulSword()); + soulBow = registerItem(new ItemSoulBow()); } public static void initRenders() @@ -302,6 +305,11 @@ public class ModItems renderHelper.itemRender(soulSword, 0); renderHelper.itemRender(soulSword, 1); + renderHelper.itemRender(soulBow, 0, "ItemSoulBow"); + renderHelper.itemRender(soulBow, 1, "ItemSoulBow_pulling_0"); + renderHelper.itemRender(soulBow, 2, "ItemSoulBow_pulling_1"); + renderHelper.itemRender(soulBow, 3, "ItemSoulBow_pulling_2"); + } private static Item registerItem(Item item, String name) diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java b/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java index 8539a42d..ee9a271d 100644 --- a/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java +++ b/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java @@ -166,8 +166,5 @@ public class ModRecipes SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AFFINITY), 300, 30, ModItems.sigilWater, ModItems.sigilAir, ModItems.sigilLava, Blocks.obsidian); SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION), 500, 50, ModBlocks.teleposer, Items.water_bucket, Items.lava_bucket, Items.blaze_rod); SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), 400, 10, "dustGlowstone", "dustRedstone", "nuggetGold", Items.gunpowder); - - GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION), "wtl", "wrl", "wol", 't', new ItemStack(ModBlocks.teleposer), 'w', new ItemStack(Items.water_bucket), 'l', new ItemStack(Items.lava_bucket), 'o', OrbRegistry.getOrbStack(ModItems.orbMaster))); - } } diff --git a/src/main/resources/assets/bloodmagic/lang/en_US.lang b/src/main/resources/assets/bloodmagic/lang/en_US.lang index ec2c44ab..0b5cdb52 100644 --- a/src/main/resources/assets/bloodmagic/lang/en_US.lang +++ b/src/main/resources/assets/bloodmagic/lang/en_US.lang @@ -116,6 +116,7 @@ item.BloodMagic.soulGem.common.name=Common Soul Gem item.BloodMagic.soulGem.greater.name=Greater Soul Gem item.BloodMagic.soulGem.grand.name=Grand Soul Gem item.BloodMagic.soulSnare.base.name=Rudimentary Soul Snare +item.BloodMagic.soulBow.name=Soul Bow # Blocks tile.BloodMagic.fluid.lifeEssence.name=Life Essence diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow.json b/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow.json new file mode 100644 index 00000000..7b3bd30b --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "bloodmagic:items/SoulBow" + }, + "display": { + "thirdperson": { + "rotation": [ 5, 80, -45 ], + "translation": [ 0.75, 0, 0.25 ], + "scale": [ 1, 1, 1 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_0.json b/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_0.json new file mode 100644 index 00000000..7e269129 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_0.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "bloodmagic:items/SoulBow_pulling_0" + }, + "display": { + "thirdperson": { + "rotation": [ 5, 80, -45 ], + "translation": [ 0.75, 0, 0.25 ], + "scale": [ 1, 1, 1 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_1.json b/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_1.json new file mode 100644 index 00000000..5f28c697 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_1.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "bloodmagic:items/SoulBow_pulling_1" + }, + "display": { + "thirdperson": { + "rotation": [ 5, 80, -45 ], + "translation": [ 0.75, 0, 0.25 ], + "scale": [ 1, 1, 1 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_2.json b/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_2.json new file mode 100644 index 00000000..a26ab923 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_2.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "bloodmagic:items/SoulBow_pulling_2" + }, + "display": { + "thirdperson": { + "rotation": [ 5, 80, -45 ], + "translation": [ 0.75, 0, 0.25 ], + "scale": [ 1, 1, 1 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulBow.png b/src/main/resources/assets/bloodmagic/textures/items/SoulBow.png new file mode 100644 index 0000000000000000000000000000000000000000..8ece767ddc35a76e7e3cf1514a8f0720c4c82e12 GIT binary patch literal 708 zcmV;#0z3VQP)G{n$kR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main/resources/assets/bloodmagic/textures/items/SoulBow_pulling_2.png new file mode 100644 index 0000000000000000000000000000000000000000..313a44d63518b92d7d8f990ece0e7d324365de62 GIT binary patch literal 687 zcmV;g0#N;lP)n^C}VH zU!j!Bszrnxv$(nr-OkO+z>_}gDB4?^tTVUQw@uIzc=|p9hh5U`M0NBH5^QNUNjtWv zX_`Vr5D_*uHYk}0%hAuPViMh6pM+w|a;dXNLa}8D&BP@%6VKE$anUqQlu5SR?cC`d z;BI?VYK~uHHFAQ%p%KoXKDMJLx~?m=)kLKfZm&;9CyOyf%Gz(K;#?<`X%wv`QMI`l z15@Slz)`4d01b&B1bh2&dwrruBb+;#Bs|_lfoqK0o<^!_T^OGhp}Nu}TaVfR#Ni;& znsIw@XoRV$cX%EiRN?V1u3uh}x38X4;;utEK3WOR=Dbl>mLh^_n5Jpsc`-mTwa&NH zI+Wg&nx-$(CeyUZG=3w2-$+QEJVQh>9hi7L{1Skog5A{j+$Ru?;a|9?!sA^`HSf!c zv%Y_A^9$yLT{z_dU~zJcy+x(`tgJ@mMQDpRS|VS&A7v$B`_qJxo6nwxR#aYu*w8$H zC9*VoQRa+7H8=kOU~>|;;?R{KIKu!OI8z0{_lYF_r5nr{g=&9ifWD64c7fjE*O|?4 zvZTtbfA2a1(Unm}{#nxLH0g92o6UxqKvoKVBO!hxA!b5