Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

NuclearFej

Members
  • Joined

  • Last visited

Everything posted by NuclearFej

  1. Just post all of the code in your actual mod class.
  2. When diesieben07 said to cast the tile entity, he meant like this: TileEntity yourEntity = world.getBlockTileEntity(x, y, z); if(yourEntity instanceof YourTileEntityType) { ((YourTileEntityType)yourEntity).yourCustomVariable; //you can access your variables like this }
  3. Okay, instead of running setup.py I tried running install.py from the install folder. (batch file doesn't work correctly, tiny little syntax error) Different problem: Traceback (most recent call last): File "install\install.py", line 11, in <module> from forge import apply_forge_patches ImportError: No module named forge Press any key to continue . . . How do I import the forge module? Or otherwise, what am I doing wrong? Thanks!
  4. Hi guys. Trying to set up a development environment to contribute to Forge a little, but having a problem along the way. setup.py does not run correctly. This is what it spits back at me: D:\Fej\Documents\GitHub\forge>fml\python\python_fml setup.py =================================== Setup Start ================================ = Setting up Forge ModLoader Running command: ['cmd', '/C', 'ant', 'jenkinsbuild'] 'ant' is not recognized as an internal or external command, operable program or batch file. Traceback (most recent call last): File "setup.py", line 113, in <module> main() File "setup.py", line 33, in main setup_fml(mcp_dir, fml_dir, build_num) File "setup.py", line 63, in setup_fml if not run_command(BUILD, cwd=fml_dir): File "setup.py", line 98, in run_command self.logger.error("failed: %d", process.returncode) NameError: global name 'self' is not defined Anyone know what the problem is? Thanks!
  5. Just want to know if this is good practice or not. What I'm doing is adding sets of armor identical to the original ones with the exception (no pun intended) of one thing: the player must be at a certain level to equip the armor. What I did to achieve this is: I created my own armor class and overrode the isValidArmor method, so that I can check if the player is of a high enough level. Problem is, there is no way to get the player from the given parameters, namely, an ItemStack and an int. So, I did the following: Minecraft.getMinecraft().thePlayer Will this cause any problems down the line? I know it's a bit hacky. Thanks!
  6. Just want to know if this is good practice or not. What I'm doing is adding sets of armor identical to the original ones with the exception (no pun intended) of one thing: the player must be at a certain level to equip the armor. What I did to achieve this is: I created my own armor class and overrode the isValidArmor method, so that I can check if the player is of a high enough level. Problem is, there is no way to get the player from the given parameters, namely, an ItemStack and an int. So, I did the following: Minecraft.getMinecraft().thePlayer Will this cause any problems down the line? I know it's a bit hacky. Thanks!
  7. Thanks for the recipe code! As for the replacing code: as it turns out, after adding in the access transformers, the Init method is no longer called. I forgot to add the @Mod annotation back in. It's always the little things. As for the recipe code itself, it works wonderfully so far! Thank you so much!
  8. Thanks for the recipe code! As for the replacing code: as it turns out, after adding in the access transformers, the Init method is no longer called. I forgot to add the @Mod annotation back in. It's always the little things. As for the recipe code itself, it works wonderfully so far! Thank you so much!
  9. Change your package declaration from net.minecraft.block to something else. Make sure to move the file to the appropriate folder, Eclipse will give you an option to do this automatically. Never, ever add new classes to net.minecraft.
  10. Change your package declaration from net.minecraft.block to something else. Make sure to move the file to the appropriate folder, Eclipse will give you an option to do this automatically. Never, ever add new classes to net.minecraft.
  11. Please paste all of your code so that we can try to find the problem.
  12. Please paste all of your code so that we can try to find the problem.
  13. The problem is that your class name has an underscore in it. I believe this is not allowed; thus, the loader cannot find it. Naming tips: http://www.wikihow.com/Name-a-Class-in-Java Of course, I might be wrong. I don't have nearly as much experience as other people on this forum. Doesn't hurt to check, though.
  14. The problem is that your class name has an underscore in it. I believe this is not allowed; thus, the loader cannot find it. Naming tips: http://www.wikihow.com/Name-a-Class-in-Java Of course, I might be wrong. I don't have nearly as much experience as other people on this forum. Doesn't hurt to check, though.
  15. java.lang.ClassNotFoundException: mod.hatchcatch.connorcraft.client.ClientProxy Are your classes in the right locations? Are they nested in the correct folders, as required by your packages?
  16. java.lang.ClassNotFoundException: mod.hatchcatch.connorcraft.client.ClientProxy Are your classes in the right locations? Are they nested in the correct folders, as required by your packages?
  17. I got the code written, but I'm having a problem. I'm trying to block players from crafting based on their level. It would appear as if the matches method is not being overrode. I stuck a println statement in there and sure enough, my version of matches never seems to be called. It seems to be obvious, but I'll ask anyway: when is matches called? Otherwise, can you see any different problems? Thanks! Here's the relevant code: FejRecipeShaped http://pastebin.com/Dy90uFb3 FejRecipeHandler http://pastebin.com/aHEWxKjz
  18. I got the code written, but I'm having a problem. I'm trying to block players from crafting based on their level. It would appear as if the matches method is not being overrode. I stuck a println statement in there and sure enough, my version of matches never seems to be called. It seems to be obvious, but I'll ask anyway: when is matches called? Otherwise, can you see any different problems? Thanks! Here's the relevant code: FejRecipeShaped http://pastebin.com/Dy90uFb3 FejRecipeHandler http://pastebin.com/aHEWxKjz
  19. I figured this out, for what it's worth... posting here because this topic is the top Google result for "minecraft forge valid manifest". There must be an extra line in the file, completely blank. So it should look something like this: (line numbers next to the actual lines) 1 Manifest-Version: 1.0 2 FMLCorePlugin: your.plugin.name.Here 3 Note the extra blank line. Actual file: Manifest-Version: 1.0 FMLCorePlugin: your.plugin.name.Here
  20. I figured this out, for what it's worth... posting here because this topic is the top Google result for "minecraft forge valid manifest". There must be an extra line in the file, completely blank. So it should look something like this: (line numbers next to the actual lines) 1 Manifest-Version: 1.0 2 FMLCorePlugin: your.plugin.name.Here 3 Note the extra blank line. Actual file: Manifest-Version: 1.0 FMLCorePlugin: your.plugin.name.Here
  21. For example, the java class net.minecraft.block.Block must be, and is, contained within a series of folders like so: net\minecraft\block\Block.java Edit: diesieben07 beat me to it.
  22. For example, the java class net.minecraft.block.Block must be, and is, contained within a series of folders like so: net\minecraft\block\Block.java Edit: diesieben07 beat me to it.
  23. I believe you have to actually change the visibility of spawnHostileMobs to public in the minecraft code. The tutorial says this: I believe that the first option in the box that pops up changes spawnHostileMobs from private to public. Can someone clarify? I've been confused by this too. Thanks!
  24. I believe you have to actually change the visibility of spawnHostileMobs to public in the minecraft code. The tutorial says this: I believe that the first option in the box that pops up changes spawnHostileMobs from private to public. Can someone clarify? I've been confused by this too. Thanks!
  25. If you absolutely must override it, you will have to use an access transformer. www.minecraftforge.net/wiki/Using_Access_Transformers

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.