Added Flower Band recipes and completed the achievement to go with them

This commit is contained in:
Adubbz 2013-05-10 17:12:56 +10:00
parent 351182e19d
commit 4bd4e7af0c
4 changed files with 35 additions and 1 deletions

View File

@ -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

View File

@ -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)});

View File

@ -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;

View File

@ -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) {}
}