From 7f38e7d047d0ad66244e6f6b406465458d78d901 Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Thu, 16 May 2013 10:23:18 -0400 Subject: [PATCH] Added sunflower seeds. Updated Thaumcraft integration. --- src/minecraft/biomesoplenty/api/Items.java | 1 + .../configuration/BOPConfiguration.java | 2 ++ .../configuration/BOPCrafting.java | 1 + .../biomesoplenty/configuration/BOPItems.java | 3 +++ .../integration/ThaumcraftIntegration.java | 2 ++ .../items/ItemSunflowerSeeds.java | 21 ++++++++++++++++++ .../textures/items/sunflowerseeds.png | Bin 0 -> 203 bytes 7 files changed, 30 insertions(+) create mode 100644 src/minecraft/biomesoplenty/items/ItemSunflowerSeeds.java create mode 100644 src/minecraft/mods/BiomesOPlenty/textures/items/sunflowerseeds.png diff --git a/src/minecraft/biomesoplenty/api/Items.java b/src/minecraft/biomesoplenty/api/Items.java index b7c98e1fb..f5a21e72c 100644 --- a/src/minecraft/biomesoplenty/api/Items.java +++ b/src/minecraft/biomesoplenty/api/Items.java @@ -32,6 +32,7 @@ public class Items public static Optional ancientStaff = Optional.absent(); public static Optional enderporter = Optional.absent(); public static Optional shroomPowder = Optional.absent(); + public static Optional sunflowerSeeds = Optional.absent(); public static Optional miscItems = Optional.absent(); public static Optional mudball = Optional.absent(); public static Optional poison = Optional.absent(); diff --git a/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java b/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java index 6707a7ed4..b27652f04 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java +++ b/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java @@ -184,6 +184,7 @@ public class BOPConfiguration { //Item IDs public static int shroomPowderID; + public static int sunflowerSeedsID; public static int ancientStaffID; public static int enderporterID; @@ -671,6 +672,7 @@ public class BOPConfiguration { // Get Item ID's shroomPowderID = config.getItem("Shroom Powder ID", 21001, null).getInt(); + sunflowerSeedsID = config.getItem("Sunflower Seeds ID", 21002, null).getInt(); ancientStaffID = config.getItem("Ancient Staff ID", 21006).getInt(); enderporterID = config.getItem("Enderporter ID", 21007).getInt(); diff --git a/src/minecraft/biomesoplenty/configuration/BOPCrafting.java b/src/minecraft/biomesoplenty/configuration/BOPCrafting.java index dddfb72bd..ae4a6d4e0 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPCrafting.java +++ b/src/minecraft/biomesoplenty/configuration/BOPCrafting.java @@ -39,6 +39,7 @@ public class BOPCrafting GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 2, 7), new Object[] {new ItemStack(Blocks.moss.get(),1,0)}); GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 2, 8), new Object[] {new ItemStack(Blocks.flowers.get(),1,9)}); GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 2, 9), new Object[] {new ItemStack(Blocks.flowers.get(),1,2)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.sunflowerSeeds.get(), 4, 0), new Object[] {new ItemStack(Blocks.flowers.get(),1,13)}); //Brick stairs and slabs GameRegistry.addRecipe(new ItemStack(Blocks.stoneSingleSlab.get(), 6, 0), new Object[] {"RRR", 'R', new ItemStack(Blocks.redRock.get(),1,1)}); diff --git a/src/minecraft/biomesoplenty/configuration/BOPItems.java b/src/minecraft/biomesoplenty/configuration/BOPItems.java index 3a99d06e3..10d1f847c 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPItems.java +++ b/src/minecraft/biomesoplenty/configuration/BOPItems.java @@ -29,6 +29,7 @@ import biomesoplenty.items.ItemDart; import biomesoplenty.items.ItemDartBlower; import biomesoplenty.items.ItemEnderporter; import biomesoplenty.items.ItemShroomPowder; +import biomesoplenty.items.ItemSunflowerSeeds; import biomesoplenty.items.overrides.ItemShears; import com.google.common.base.Optional; @@ -106,6 +107,7 @@ public class BOPItems { { // Item declaration Items.shroomPowder = Optional.of(new ItemShroomPowder(BOPConfiguration.shroomPowderID, 1, 0.5F, false)); + Items.sunflowerSeeds = Optional.of(new ItemSunflowerSeeds(BOPConfiguration.sunflowerSeedsID, 1, 1.5F, false)); Items.miscItems = Optional.of(new ItemBOP(BOPConfiguration.miscItemsID)); Items.mudball = Optional.of(new ItemBOPMudball(BOPConfiguration.mudballID)); Items.dartBlower = Optional.of(new ItemDartBlower(BOPConfiguration.dartBlowerID)); @@ -144,6 +146,7 @@ public class BOPItems { private static void registerNames() { LanguageRegistry.addName(Items.shroomPowder.get(), "Shroom Powder"); + LanguageRegistry.addName(Items.sunflowerSeeds.get(), "Sunflower Seeds"); LanguageRegistry.addName(Items.mudball.get(), "Mud Ball"); LanguageRegistry.addName(Items.dartBlower.get(), "Dart Blower"); LanguageRegistry.addName(new ItemStack(Items.dart.get(), 1, 0), "Dart"); diff --git a/src/minecraft/biomesoplenty/integration/ThaumcraftIntegration.java b/src/minecraft/biomesoplenty/integration/ThaumcraftIntegration.java index fad6c4b7e..98486ba19 100644 --- a/src/minecraft/biomesoplenty/integration/ThaumcraftIntegration.java +++ b/src/minecraft/biomesoplenty/integration/ThaumcraftIntegration.java @@ -169,6 +169,8 @@ public class ThaumcraftIntegration { ThaumcraftApi.registerObjectTag(getBID("tulip"), getBMeta("tulip"), (new ObjectTags()).add(EnumTag.FLOWER, 4)); ThaumcraftApi.registerObjectTag(getBID("aloe"), getBMeta("aloe"), (new ObjectTags()).add(EnumTag.FLOWER, 4).add(EnumTag.PLANT, 4)); ThaumcraftApi.registerObjectTag(getBID("clover"), getBMeta("clover"), (new ObjectTags()).add(EnumTag.FLOWER, 1).add(EnumTag.PLANT, 1)); + ThaumcraftApi.registerObjectTag(getBID("lilyflower"), getBMeta("lilyflower"), (new ObjectTags()).add(EnumTag.FLOWER, 1).add(EnumTag.PLANT, 1).add(EnumTag.WATER, 1)); + ThaumcraftApi.registerObjectTag(getBID("sunflower"), getBMeta("sunflower"), (new ObjectTags()).add(EnumTag.FLOWER, 1).add(EnumTag.PLANT, 1).add(EnumTag.LIGHT, 1)); } diff --git a/src/minecraft/biomesoplenty/items/ItemSunflowerSeeds.java b/src/minecraft/biomesoplenty/items/ItemSunflowerSeeds.java new file mode 100644 index 000000000..2718f01d5 --- /dev/null +++ b/src/minecraft/biomesoplenty/items/ItemSunflowerSeeds.java @@ -0,0 +1,21 @@ +package biomesoplenty.items; + +import biomesoplenty.BiomesOPlenty; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.item.ItemFood; +import net.minecraft.potion.Potion; + +public class ItemSunflowerSeeds extends ItemFood +{ + public ItemSunflowerSeeds(int par1, int par2, float par3, boolean par4) + { + super(par1, par2, par3, par4); + setAlwaysEdible().setUnlocalizedName("sunflowerSeeds"); + setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); + } + + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("BiomesOPlenty:sunflowerseeds"); + } +} diff --git a/src/minecraft/mods/BiomesOPlenty/textures/items/sunflowerseeds.png b/src/minecraft/mods/BiomesOPlenty/textures/items/sunflowerseeds.png new file mode 100644 index 0000000000000000000000000000000000000000..305a6396491706e3336584ce841a58d7e7fd2b6f GIT binary patch literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+L6~vJ#O${~L8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3Q$0figD*u3fvVg+ zT^vI!{F5bEP1rs!zxu!3=p?fO^RL&z584D$6*j2}#ENC}UuSuwEZxDFFl(Y|Anybb tIfbJq;vCb2SugB$G|uPcK5&46!A!>D*TzYo)qzGbc)I$ztaD0e0s#8gJMaJi literal 0 HcmV?d00001