Jump to content

Pentagear

Members
  • Posts

    9
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • URL
    http://bionikcraft.com
  • Location
    Nashville, TN
  • Personal Text
    I am new!

Pentagear's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Ahhh okay. Thanks for that! I will keep that in mind for the future. At first it seemed an odd little quirk but when I started looking and really thinking about the construction of addRecipe, it makes sense that they are considered different.
  2. SOLVED! Now using: @Init public void load(FMLInitializationEvent event) { proxy.registerRenderers(); // BionikCraft: Redstone Furnace GameRegistry.addRecipe( new ItemStack(Block.bedrock, 1), new Object[] { "bab", "aea", "cdc", 'a', Block.obsidian, 'b', Block.blockSteel, 'c', Item.redstoneRepeater, 'd', Block.field_94341_cq, 'e', Block.furnaceIdle } ); } Seems that for some reason ("a", obj, "b", obj, "c", obj) is in fact different than ('a', obj, 'b', obj, 'c', obj). My own stupid fault for assuming quotes were similar. I'm familiar with other C based languages, though this is the first time I've run into this kind of problem with strings. Tested and working. Thanks again both of you.
  3. I noticed that you are using a format that I haven't seen. new Object[]{"P",'P', new ItemStack(Item.redstoneRepeater,1)} and new Object[]{"P",'P', Item.redstoneRepeater} I understand what these mean, though is this how I have to identify those particular items, inside an Object?
  4. Quite literally the result of ending the 2nd tutorial is what my code is. The only difference being is that I'm not using the recipes in the tutorial, rather just my own, the only code I've changed in that tutorial is in the Generic.java file: package tutorial.generic; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.PostInit; import cpw.mods.fml.common.Mod.PreInit; import cpw.mods.fml.common.SidedProxy; 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="Generic", name="Generic", version="0.0.0") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class Generic { // The instance of the mod that Forge uses @Instance("Generic") public static Generic instance; // Say where the client and server 'proxy' code are loaded @SidedProxy(clientSide="tutorial.generic.client.ClientProxy", serverSide="tutorial.generic.CommonProxy") public static CommonProxy proxy; @PreInit public void preInit(FMLPreInitializationEvent event) { // Stub Method } @Init public void load(FMLInitializationEvent event) { proxy.registerRenderers(); ItemStack furnaceStack = new ItemStack(Block.furnaceIdle); ItemStack obsidianStack = new ItemStack(Block.obsidian); ItemStack ironBlockStack = new ItemStack(Block.blockSteel); ItemStack repeaterStack = new ItemStack(Item.redstoneRepeater); ItemStack redstoneBlockStack = new ItemStack(Block.field_94341_cq); ItemStack blockDiamondStack = new ItemStack(Block.blockDiamond); GameRegistry.addRecipe( blockDiamondStack, "bab", "aea", "cdc", "a",obsidianStack, "b",ironBlockStack, "c",repeaterStack, "d",redstoneBlockStack, "e",furnaceStack ); } @PostInit public void postInit(FMLPostInitializationEvent event) { // Stub Method } } That was my assumption too, that it was something else, but I've literally only tinkered with the Generic.java file.
  5. Doesn't work resulted in the client crashing after compile. I am away from the computer right now, but as soon as I get back, I will forward the logs that were generated, as well as posting all of the code for the package.
  6. Hmmm. It seems unfortunate that simply changing the line into: ItemStack repeaterStack = new ItemStack(Item.redstoneRepeater); Did not work. At this point I'm clueless, and ideas I had about this working seem to be wrong .
  7. Awesome! Looks like that works. Where in the project explorer would I find a list of similar behaved items, so I don't have to ask again? Edit: Nevermind! Found the Item list in net.minecraft.item > Item.java... Thanks again for the help diesieben07!
  8. Ah, that makes sense. Thank you diesieben07. How would I go about allowing the use of repeaters in a recipe? I've seen other Mods with the ability to use them, what am I missing here?
  9. So I recently picked up Modding and have successfully made a couple recipes based on the Forge tutorials. What I'm running into however, is when I attempt to use Redstone Repeaters in a recipe, it crashes the client. I'm sure there is something I'm missing, perhaps the ItemStack object cannot handle BlockRedstoneRepeater types. Here's an example of a recipe I'd like to use them in (all other block types work for this recipe so code is omitted): ItemStack furnaceStack = new ItemStack(Block.furnaceIdle); ItemStack obsidianStack = new ItemStack(Block.obsidian); ItemStack ironBlockStack = new ItemStack(Block.blockSteel); ItemStack repeaterStack = new ItemStack(BlockRedstoneRepeater.redstoneRepeaterIdle); ItemStack redstoneBlockStack = new ItemStack(Block.field_94341_cq); ItemStack blockDiamondStack = new ItemStack(Block.blockDiamond); GameRegistry.addRecipe( blockDiamondStack, "bab", "aea", "cdc", "a",obsidianStack, "b",ironBlockStack, "c",repeaterStack, "d",redstoneBlockStack, "e",furnaceStack ); I'm sorry if this is a really simple problem, but I couldn't find anything after searching on it for several hours. Do I need to modify or extend a class to enable this? What do I do? I forgot to mention that the blockDiamondStack is there as a placeholder until I learn how to create entirely new blocks.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.