Skip 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.

Choonster

Moderators

Everything posted by Choonster

  1. I'd recommend using a lowercase mod ID to avoid any trouble. Though looking at the icon registering code in 1.7.10, the icon name always gets used in the ResourceLocation(String) constructor first; so your mod ID should be converted to lowercase for icons anyway.
  2. Only use events when you need to react to things outside of your control (usually vanilla blocks, items, entities, etc.). For your own classes, you can usually override a method that's called at the appropriate time instead. Your current code is wrong in several ways: You're not registering your instance on the appropriate event bus Even if you were registering it, you'd be replacing every broken block with Main.CastleWall1 since you never check which block was broken In this case, you'll probably want to override Block#breakBlock or Block#removedByPlayer.
  3. Use World#getBlockState to get the IBlockState at a BlockPos and IBlockState#getBlock to get the Block from an IBlockState.
  4. This is possible, since 1.7.10 only converts the domain of a ResourceLocation to lowercase from the ResourceLocation(String) constructor but not the ResourceLocation(String,String) constructor.
  5. Override Block#onBlockActivated to do something when the Block is right clicked. Use EntityPlayer#getHeldItem to get the player's held item. To spawn an Entity, check if it's the server (world.isRemote is false), create the Entity object and then call World#spawnEntityInWorld.
  6. In that screenshot, you're calling registerRender with the non-existent item variable. What I'm telling you to do is change the code inside the registerRender method to use the item argument.
  7. From your PM: public static void registerRenders() { registerRender(Small_Flint); registerRender(Twigs); } This part is correct, but inside the registerRender method you should use item instead of Small_Flint or Twigs.
  8. I'm pretty sure the error is because your SimpleNetworkWrapper channel name exceeds the maximum length of 20.
  9. genBiomeTerrain is only called by genTerrainBlocks, the latter is the method called by ChunkProviderGenerate to generate the terrain. Override genTerrainBlocks instead of genBiomeTerrain.
  10. The crash report tells you exactly what went wrong: registerRenders requires an Item argument, but you tried to call it with no arguments. A method named registerRenders (which implies that it registers multiple things) shouldn't need an Item argument (since it should be registering models for multiple items, not just one).
  11. Upload the contents of the crash report (crash-reports/crash-2015-07-27_18.47.15-client.txt) and your code to Gist and link them here. The part you've posted doesn't contain much useful information, I need to see the stacktrace to help you.
  12. You still need to call registerRender with each Item field from registerRenders, but you should be using the item argument within registerRender instead of the fields.
  13. Well post your code and the error, then.
  14. Do you understand what a method argument is and how to use one? This is very basic Java knowledge. Instead of using Small_Flint or Twigs in registerRender, simply use item (the method's argument).
  15. registerRender should only use its Item argument, it shouldn't use any of the Item fields.
  16. registerRender should only register the model for its Item argument. registerRenders should call registerRender once for each Item to register the model for that Item.
  17. This is actually a bad idea since it has some unwanted side-effects. Use idea.module.inheritOutputDirs = true instead. And IntelliJ is not doing anything incorrectly, it's just following what gradle tells it to do. Thanks, I've replaced the previous code with this code in my mods.
  18. Which overload of onEntityCollidedWithBlock did you override? onEntityCollidedWithBlock(World, BlockPos, Entity) is only called for the Block under an Entity, onEntityCollidedWithBlock(World, BlockPos, IBlockState, Entity) is called for any Block that an Entity collides with. For an Entity to collide with your Block on any given side, its bounding box needs to be inset by at least 0.01 on that side.
  19. I'm not too sure what the issue is. Could you put your workspace on GitHub or a similar site and link it here? This .gitignore file will ignore any files that don't need to be tracked in your repository.
  20. Just putting it at the end of the file outside of any block should work. I have it in my mod's build.gradle here. You do have the texture in src/main/resources/assets/letsmod/textures/items/mapleLeaf.png, right?
  21. IntelliJ IDEA doesn't copy resources properly for Gradle projects by default. Add the following snippet to your build.gradle script to fix it. sourceSets { main { output.resourcesDir = output.classesDir } } Source
  22. Use Block#getMaterial to get a Block's Material or use Block#isWood to check if a Block is wood.
  23. Do you have CCC and NEI in your Eclipse project anyway or are they missing? They may have been already been downloaded.
  24. You can use StatCollector.translateToLocal to translate a key (e.g. "translation.test.none") to the current language.
  25. Ah, I wasn't entirely sure what ObfuscationReflectionHelper was for. Thanks for informing me. ReflectionHelper won't automatically obfuscate/deobfuscate names for you, but it does let you provide both the MCP and SRG names of a field/method to save you the trouble of using reflection on both names individually.

Important Information

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

Account

Navigation

Search

Search

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.