Skip to content

Commit

Permalink
Move golden head to World and fix double-creation that derped the reg…
Browse files Browse the repository at this point in the history
…istration. #881
  • Loading branch information
bonii-xx committed Aug 21, 2014
1 parent 9490b1a commit 5b8484d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/main/java/tconstruct/armor/TinkerArmor.java
Expand Up @@ -118,7 +118,6 @@ public void preInit (FMLPreInitializationEvent event)
// glove = new
// Glove(PHConstruct.glove).setUnlocalizedName("tconstruct.Glove");
TinkerArmor.knapsack = new Knapsack().setUnlocalizedName("tconstruct.storage");
TinkerTools.goldHead = new GoldenHead(4, 1.2F, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 10, 0, 1.0F).setUnlocalizedName("goldenhead");
// GameRegistry.registerItem(TRepo.heavyHelmet, "heavyHelmet");
GameRegistry.registerItem(TinkerArmor.heartCanister, "heartCanister");
// GameRegistry.registerItem(TRepo.heavyBoots, "heavyBoots");
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/smeltery/TinkerSmeltery.java
Expand Up @@ -1101,7 +1101,8 @@ private void addRecipesForTableCasting ()
tableCasting.addCastingRecipe(new ItemStack(Items.golden_apple, 1), goldAmount, new ItemStack(Items.apple), true, 50);
tableCasting.addCastingRecipe(new ItemStack(Items.golden_carrot, 1), goldAmount, new ItemStack(Items.carrot), true, 50);
tableCasting.addCastingRecipe(new ItemStack(Items.speckled_melon, 1), goldAmount, new ItemStack(Items.melon), true, 50);
tableCasting.addCastingRecipe(new ItemStack(TinkerTools.goldHead), goldAmount, new ItemStack(Items.skull, 1, 3), true, 50);
if(TinkerWorld.goldHead != null)
tableCasting.addCastingRecipe(new ItemStack(TinkerWorld.goldHead), goldAmount, new ItemStack(Items.skull, 1, 3), true, 50);
}

protected static void addRecipesForBasinCasting ()
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/tconstruct/tools/TinkerTools.java
Expand Up @@ -186,7 +186,6 @@ public class TinkerTools
public static Item manualBook;
public static ToolCore excavator;
public static Item creativeModifier;
public static Item goldHead;

// recipe stuff
public static boolean thaumcraftAvailable;
Expand Down Expand Up @@ -337,8 +336,6 @@ public void preInit (FMLPreInitializationEvent event)
// compat
TConstructRegistry.addItemToDirectory(toolPartStrings[i], toolParts[i]);
}
goldHead = new GoldenHead(4, 1.2F, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 10, 0, 1.0F).setUnlocalizedName("goldenhead");
GameRegistry.registerItem(TinkerTools.goldHead, "goldHead");

TinkerTools.creativeModifier = new CreativeModifier().setUnlocalizedName("tconstruct.modifier.creative");
GameRegistry.registerItem(TinkerTools.creativeModifier, "creativeModifier");
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/tconstruct/world/TinkerWorld.java
Expand Up @@ -14,6 +14,7 @@
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.potion.Potion;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.common.MinecraftForge;
Expand Down Expand Up @@ -78,6 +79,7 @@
import tconstruct.world.itemblocks.SlimeTallGrassItem;
import tconstruct.world.itemblocks.WoolSlab1Item;
import tconstruct.world.itemblocks.WoolSlab2Item;
import tconstruct.world.items.GoldenHead;
import tconstruct.world.items.OreBerries;
import tconstruct.world.items.StrangeFood;
import cpw.mods.fml.common.Mod.Instance;
Expand Down Expand Up @@ -134,6 +136,8 @@ public class TinkerWorld
public static ChestGenHooks tinkerHousePatterns;
public static Block punji;
public static Block metalBlock;
// Morbid
public static Item goldHead;

@Handler
public void preInit (FMLPreInitializationEvent event)
Expand Down Expand Up @@ -251,6 +255,9 @@ public void preInit (FMLPreInitializationEvent event)
GameRegistry.registerBlock(TinkerWorld.woodenRail, "rail.wood");

//Items
goldHead = new GoldenHead(4, 1.2F, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 10, 0, 1.0F).setUnlocalizedName("goldenhead");
GameRegistry.registerItem(goldHead, "goldHead");


TinkerWorld.strangeFood = new StrangeFood().setUnlocalizedName("tconstruct.strangefood");
TinkerWorld.oreBerries = new OreBerries().setUnlocalizedName("oreberry");
Expand Down Expand Up @@ -407,7 +414,7 @@ private void craftingTableRecipes()
//GameRegistry.addRecipe(new ItemStack(Blocks.light_weighted_pressure_plate, 0, 1), "ii", 'i', aluBrass);

// Ultra hardcore recipes
GameRegistry.addRecipe(new ItemStack(TinkerTools.goldHead), patSurround, '#', new ItemStack(Items.gold_ingot), 'm', new ItemStack(Items.skull, 1, 3));
GameRegistry.addRecipe(new ItemStack(goldHead), patSurround, '#', new ItemStack(Items.gold_ingot), 'm', new ItemStack(Items.skull, 1, 3));


// Wool Slab Recipes
Expand Down

0 comments on commit 5b8484d

Please sign in to comment.