diff --git a/src/minecraft/biomesoplenty/BiomesOPlenty.java b/src/minecraft/biomesoplenty/BiomesOPlenty.java index 2a5f56ff4..74b5a4a6f 100644 --- a/src/minecraft/biomesoplenty/BiomesOPlenty.java +++ b/src/minecraft/biomesoplenty/BiomesOPlenty.java @@ -19,6 +19,7 @@ import biomesoplenty.configuration.BOPEntities; import biomesoplenty.configuration.BOPItems; import biomesoplenty.configuration.BOPVanillaCompat; import biomesoplenty.helpers.AchievementHelper; +import biomesoplenty.helpers.BOPCraft; import biomesoplenty.helpers.BonemealUse; import biomesoplenty.helpers.CreativeTabsBOP; import biomesoplenty.integration.BOPCrossIntegration; @@ -37,6 +38,7 @@ import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; +import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid="BiomesOPlenty", name="Biomes O' Plenty", version="0.5.2") @@ -112,6 +114,8 @@ public class BiomesOPlenty { AchievementHelper.init(); } + + GameRegistry.registerCraftingHandler(new BOPCraft()); } @Init diff --git a/src/minecraft/biomesoplenty/configuration/BOPCrafting.java b/src/minecraft/biomesoplenty/configuration/BOPCrafting.java index 00e64a3bd..832784010 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPCrafting.java +++ b/src/minecraft/biomesoplenty/configuration/BOPCrafting.java @@ -138,6 +138,12 @@ public class BOPCrafting GameRegistry.addRecipe(new ItemStack(Items.leggingsAmethyst.get(), 1), new Object [] {"###", "# #", "# #", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2)}); GameRegistry.addRecipe(new ItemStack(Items.bootsAmethyst.get(), 1), new Object [] {"# #", "# #", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2)}); + //Flower Bands + GameRegistry.addRecipe(new ItemStack(Items.flowerBand.get(), 1, 0), new Object [] {"CCC", "C C", "CCC", Character.valueOf('C'), new ItemStack(Blocks.flowers.get(), 1, 0)}); + GameRegistry.addRecipe(new ItemStack(Items.flowerBand.get(), 1, 1), new Object [] {"CDC", "D D", "CDC", Character.valueOf('C'), new ItemStack(Blocks.flowers.get(), 1, 0), Character.valueOf('D'), new ItemStack(Blocks.flowers.get(), 1, 5)}); + GameRegistry.addRecipe(new ItemStack(Items.flowerBand.get(), 1, 2), new Object [] {"CDC", "V V", "CDC", Character.valueOf('C'), new ItemStack(Blocks.flowers.get(), 1, 0),Character.valueOf('D'), new ItemStack(Blocks.flowers.get(), 1, 5), Character.valueOf('V'), new ItemStack(Blocks.flowers.get(), 1, 8)}); + GameRegistry.addRecipe(new ItemStack(Items.flowerBand.get(), 1, 3), new Object [] {"CDT", "V V", "TDC", Character.valueOf('C'), new ItemStack(Blocks.flowers.get(), 1, 0),Character.valueOf('D'), new ItemStack(Blocks.flowers.get(), 1, 5), Character.valueOf('V'), new ItemStack(Blocks.flowers.get(), 1, 8), Character.valueOf('T'), new ItemStack(Blocks.flowers.get(), 1, 6)}); + //Other GameRegistry.addRecipe(new ItemStack(Item.wheat, 1), new Object[] {"###", '#', new ItemStack(Blocks.plants.get(),1,6)}); GameRegistry.addRecipe(new ItemStack(Items.ancientStaff.get(), 1, 0), new Object[] {"T", "P", "H", 'T', new ItemStack(Items.ancientStaff.get(), 1, 3), 'P', new ItemStack(Items.ancientStaff.get(), 1, 2), 'H', new ItemStack(Items.ancientStaff.get(), 1, 1)}); diff --git a/src/minecraft/biomesoplenty/helpers/AchievementHelper.java b/src/minecraft/biomesoplenty/helpers/AchievementHelper.java index dbc02e442..3b4ada0c5 100644 --- a/src/minecraft/biomesoplenty/helpers/AchievementHelper.java +++ b/src/minecraft/biomesoplenty/helpers/AchievementHelper.java @@ -2,6 +2,8 @@ package biomesoplenty.helpers; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; import net.minecraftforge.common.AchievementPage; @@ -10,6 +12,7 @@ import net.minecraftforge.event.entity.player.EntityItemPickupEvent; import biomesoplenty.api.Blocks; import biomesoplenty.api.Items; import biomesoplenty.configuration.BOPConfiguration; +import cpw.mods.fml.common.ICraftingHandler; import cpw.mods.fml.common.registry.LanguageRegistry; public class AchievementHelper @@ -25,7 +28,7 @@ public class AchievementHelper private static Achievement achShroom; private static Achievement achBarley; private static Achievement achMoss; - private static Achievement achFlowerP; + static Achievement achFlowerP; public static AchievementPage pageBOP; diff --git a/src/minecraft/biomesoplenty/helpers/BOPCraft.java b/src/minecraft/biomesoplenty/helpers/BOPCraft.java new file mode 100644 index 000000000..cd45005a8 --- /dev/null +++ b/src/minecraft/biomesoplenty/helpers/BOPCraft.java @@ -0,0 +1,21 @@ +package biomesoplenty.helpers; + +import biomesoplenty.api.Blocks; +import biomesoplenty.api.Items; +import biomesoplenty.configuration.BOPConfiguration; +import cpw.mods.fml.common.ICraftingHandler; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public class BOPCraft implements ICraftingHandler +{ + public void onCrafting(EntityPlayer var1, ItemStack var2, IInventory var3) + { + if (var2.itemID == Items.flowerBand.get().itemID && BOPConfiguration.achievements) + var1.addStat(AchievementHelper.achFlowerP, 1); + } + + public void onSmelting(EntityPlayer var1, ItemStack var2) {} +}