Jump to content

AssassinHero

Members
  • Posts

    179
  • Joined

  • Last visited

Everything posted by AssassinHero

  1. Ummm yeah, I broke it again.... View my last post to get the low down: http://www.minecraftforge.net/forum/index.php/topic,6760.0.html Basically the item isn't going into the game here is the main mod code package assassinhero.parallelworlds.common; import net.minecraft.item.Item; import assassinhero.parallelworlds.client.core.handlers.ClientPacketHandler; import assassinhero.parallelworlds.common.core.CommonProxy; import assassinhero.parallelworlds.common.core.handlers.ServerPacketHandler; import assassinhero.parallelworlds.common.item.ItemNightStone; 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.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @NetworkMod(clientSideRequired=true,serverSideRequired=false, clientPacketHandlerSpec = @SidedPacketHandler(channels = { "ParallelWorlds" }, packetHandler = ClientPacketHandler.class), serverPacketHandlerSpec = @SidedPacketHandler(channels = { }, packetHandler = ServerPacketHandler.class)) @Mod(modid="ParallelWorlds",name="ParallelWorlds",version="1.0.0") public class Mod_ParallelWorlds { @Instance("ParallelWorlds") public static Mod_ParallelWorlds instance = new Mod_ParallelWorlds(); @SidedProxy(clientSide = "assassinhero.parallelworlds.client.core.ClientProxy", serverSide = "assassinhero.parallelworlds.common.core.CommonProxy") public static CommonProxy proxy; @Init public void InitParallelWorlds (FMLInitializationEvent event){ public static Item NightStone = new ItemNightStone(682).setUnlocalizedName("Night Stone"); NetworkRegistry.instance().registerGuiHandler(this, proxy); LanguageRegistry.addName(Mod_ParallelWorlds.NightStone, "Night Stone"); proxy.addNames(); } } Here is the item code package assassinhero.parallelworlds.common.item; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class ItemNightStone extends Item{ public ItemNightStone(int par1){ super(par1); setCreativeTab(CreativeTabs.tabMaterials); } @SideOnly(Side.CLIENT) public int getItemIconFromDamage(int i) { return 0; } } Any help?!?!
  2. Hey Guys, I'm new to coding so I wanted to make a mod which adds items etc. I am going off a tutorial and fitting it to my mod, I am in the middle of adding my first item, unfortunantly I am getting errors. This is the code.... public class ItemNightStone extends Item{ public ItemNightStone(int par1){ super(par1); setCreativeTab(CreativeTabs.tabMaterials); } @SideOnly(Side.CLIENT) public int getItemIconFromDamage(int i) { return 0; } public static Item NightStone = new ItemNightStone(15000); LanguageRegistry.addName(Mod_ParallelWorlds.NightStone, "Night Stone"); proxy.addNames(); } Can someone please correct this code for me?
  3. No need to be an idiot Clearly I'm new and learning so the normal thing to do is to help out. Therefore screw you
  4. This is my code for the BlockNightiumOre Class public class BlockNightiumOre extends Block{ public BlockNightiumOre(int id, int texture, Material material){ super(id, material.rock); this.setCreativeTab(CreativeTabs.tabBlock); } public String getTextureFile(){ return "/parallelworlds/parallelworlds_Blocks_NightiumOre.png"; } } This is my code for my main class file @Mod(modid = "Parallel Worlds", name = "Parallel Worlds", version = "1.0.0") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class ParallelWorlds { @SidedProxy(clientSide = "parallelworlds.client.ClientProxyParallelWorlds", serverSide = "parallelworlds.common.CommonProxyParallelWorlds") public static ClientProxyParallelWorlds proxy = new ClientProxyParallelWorlds(); Block parallelworldsBlock; int parallelworldsBlockID = 682; @Init public void load(FMLInitializationEvent event){ parallelworldsBlock = new BlockParallelWorldsBlock(parallelworldsBlockID, 0, Material.iron).setUnlocalizedName("Nightium").setHardness(8.0F).setResistance(10000.0F).setStepSound(Block.soundStoneFootstep); gameRegisters(); languageRegisters(); proxy.registerRenders(); } public void gameRegisters(){ GameRegistry.registerBlock(parallelworldsBlock);} public void languageRegisters(){ LanguageRegistry.addName(parallelworldsBlock, "Nightium"); } Block NightiumOre; int NightiumOreID = 681; @Init public void load1(FMLInitializationEvent event){ NightiumOre = new BlockNightiumOre(NightiumOreID, 1, Material.iron).setUnlocalizedName("Nightium Ore").setHardness(8.0F).setResistance(100000.0F).setStepSound(Block.soundStoneFootstep).setLightValue(1.0F); gameRegisters(); languageRegisters(); proxy.registerRenders(); } public void gameRegisters1(){ GameRegistry.registerBlock(NightiumOre); } public void languageRegisters1(){ LanguageRegistry.addName(NightiumOre, "NightiumOre"); } }
  5. I have already done that but the item isn't in the creative menu
  6. Will Nightium ore come into the creative menu after I put the generation code in?
  7. I used the code from a previously added block and it's not added for some unknown reason
  8. It's not generation... The ore doesn't exist at all
  9. I have added a block into the game called Nightium... I am now trying to add an ore so i can make nightium I have gone by the previous code and the Ore will not add into the game at all... Can anyone give me steps on how to add an ore?? Thanks
  10. I followed the same code as previous and only nightium has appeared the ore hasn't. Any suggestions? I'm new to making new blocks and ores You mean in the creative tab? Either way, you made both block variables public and static as I said? The ore isnt in the game at all. In the process now
  11. I followed the same code as previous and only nightium has appeared the ore hasn't. Any suggestions? I'm new to making new blocks and ores
  12. The block isn't going into the game. I am trying to make an ore in minecraft but when i go into the creative tabs in-game the item doesn't exist
  13. I have added a block called nightium which has been put in when I go to put the ore in I did this @Mod(modid = "Parallel Worlds", name = "Parallel Worlds", version = "1.0.0") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class ParallelWorlds { @SidedProxy(clientSide = "parallelworlds.client.ClientProxyParallelWorlds", serverSide = "parallelworlds.common.CommonProxyParallelWorlds") public static ClientProxyParallelWorlds proxy = new ClientProxyParallelWorlds(); Block parallelworldsBlock; int parallelworldsBlockID = 682; @Init public void load(FMLInitializationEvent event){ parallelworldsBlock = new BlockParallelWorldsBlock(parallelworldsBlockID, 0, Material.iron).setUnlocalizedName("Nightium").setHardness(8.0F).setResistance(10000.0F).setStepSound(Block.soundStoneFootstep); gameRegisters(); languageRegisters(); proxy.registerRenders(); } public void gameRegisters(){ GameRegistry.registerBlock(parallelworldsBlock);} public void languageRegisters(){ LanguageRegistry.addName(parallelworldsBlock, "Nightium"); } Block NightiumOre; int NightiumOreID = 681; @Init public void load1(FMLInitializationEvent event){ NightiumOre = new BlockNightiumOre(NightiumOreID, 1, Material.iron).setUnlocalizedName("Nightium Ore").setHardness(8.0F).setResistance(100000.0F).setStepSound(Block.soundStoneFootstep).setLightValue(1.0F); gameRegisters(); languageRegisters(); proxy.registerRenders(); } public void gameRegisters1(){ GameRegistry.registerBlock(NightiumOre); } public void languageRegisters1(){ LanguageRegistry.addName(NightiumOre, "NightiumOre"); } } This is my proxy public class ClientProxyParallelWorlds extends CommonProxyParallelWorlds{ @Override public void registerRenders() { MinecraftForgeClient.preloadTexture("/textures/blocks/Nightium.png"); } public void registerRenders1(){ MinecraftForgeClient.preloadTexture("/textures/blocks/NightiumOre.png"); } } This is the BlockNightiumOre File public class BlockNightiumOre extends Block{ public BlockNightiumOre(int id, int texture, Material mat){ super(id, mat); this.setCreativeTab(CreativeTabs.tabBlock); } public String getTextureFile(){ return "/parallelworlds/parallelworlds_Blocks_NightiumOre.png"; } } Any help? P.s I know ore is different code to block slightly just wondering if anyone can highlight the mistakes
  14. This is my code for my texture.. public class BlockParallelWorldsBlock extends Block{ public BlockParallelWorldsBlock(int id, int texture, Material mat){ super(id, mat); this.setCreativeTab(CreativeTabs.tabBlock); } public String getTextureFile(){ return "/parallelworlds/ParallelWorlds_Blcoks.png"; } } public class ClientProxyParallelWorlds extends CommonProxyParallelWorlds{ @Override public void registerRenders() { MinecraftForgeClient.preloadTexture("/parallelworlds/ParallelWorlds_Blcoks.png"); } } @Mod(modid = "Parallel Worlds", name = "Parallel Worlds", version = "1.0.0") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class ParallelWorlds { @SidedProxy(clientSide = "parallelworlds.client.ClientProxyParallelWorlds", serverSide = "parallelworlds.common.CommonProxyParallelWorlds") public static ClientProxyParallelWorlds proxy = new ClientProxyParallelWorlds(); Block parallelworldsBlock; int parallelworldsBlockID = 682; @Init public void load(FMLInitializationEvent event){ parallelworldsBlock = new BlockParallelWorldsBlock(parallelworldsBlockID, 0, Material.iron).setUnlocalizedName("Nightium").setHardness(8.0F).setResistance(10000.0F).setStepSound(Block.soundStoneFootstep); gameRegisters(); languageRegisters(); proxy.registerRenders(); } public void gameRegisters(){ GameRegistry.registerBlock(parallelworldsBlock);} public void languageRegisters(){ LanguageRegistry.addName(parallelworldsBlock, "Nightium"); } } Blocks is spelt Blcoks on purpose... Any help on this?!
  15. I am texturing my first block I have textured it and entered the code for it It isn't showing up so when I look in the run logs I see this error 2013-03-17 11:45:20 [iNFO] [sTDERR] java.io.IOException: Server returned HTTP response code: 503 for URL: http://s3.amazonaws.com/MinecraftResources/ 2013-03-17 11:45:20 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) 2013-03-17 11:45:20 [iNFO] [sTDERR] at net.minecraft.util.ThreadDownloadResources.run(ThreadDownloadResources.java:57) I can only assume that this is stopping the texture from being loaded... Any help?!?!
  16. I have this syntax error and i have no idea how to fix it @Mod(modid = "Parallel Worlds", name = "Parallel Worlds", version = "1.0.0") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class ParallelWorlds { Block parallelworldsBlock; int parallelworldsBlockID = 682; @Init public void load(FMLInitializationEvent event){ parallelworldsBlock = new BlockParallelWorldsBlock(parallelworldsBlockID, 1, Material.iron).setUnlocalizedName("Nightium"); gameRegisters(); languageRegisters(); } public void gameRegisters(){ GameRegistry.registerBlock(parallelworldsBlock);} public void languageRegisters(){ LanguageRegistry.addName(parallelworldsBlock, "Nightium"); } } } } It's the }, 3rd from the bottom
  17. I am making a mod which involves adding blocks into minecraft Initially this was the block code public class BlockParallelWorldsBlock extends Block{ public BlockParallelWorldsBlock(int id, int texture, Material mat){ super(id, texture, mat); That didn't work so I set it to public class BlockParallelWorldsBlock extends Block{ public BlockParallelWorldsBlock(int id, int texture, Material mat){ super(id, mat); which now works. I am trying to set the name of the block here \/\/ parallelworldsBlock = new BlockParallelWorldsBlock(parallelworldsBlockID, 1, Material.iron).setBlockName("Nightium"); However I get an error under setBlockName I don't understand why. I am watching a tutorial for it and the guy did the exact same and didn't get an error. Any Help??? Here is the full code @Mod(modid = "Parallel Worlds", name = "Parallel Worlds", version = "1.0.0") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class ParallelWorlds { Block parallelworldsBlock; int parallelworldsBlockID = 682; @Init public void load(FMLInitializationEvent event){ parallelworldsBlock = new BlockParallelWorldsBlock(parallelworldsBlockID, 1, Material.iron).setBlockName("Nightium"); } }
×
×
  • Create New...

Important Information

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