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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. ArrayLists are wonderful things.
  2. ...yes, that's the whole point of the @ObjectHolder annotation. Yes you can. You still need to call new somewhere and you can still use local variables.
  3. No. That is not what he said. He said don't assign a value to the field. @ObjectHolder(ExtraCraft.MOD_ID + ":sugar_block") public static final BlockSugar BLOCK_SUGAR;
  4. You can use getCraftingResult(InventoryCrafting inv) to examine the crafting grid and snag the NBT.
  5. You need to add to, not overwrite, the loot table
  6. Yes, you can still use the JSON system with custom IRecipe implementation. You just need a Factory internal static class that implements IRecipeFactory, a _factories.json pointing to this factory, and you're basically good to go.
  7. My point was that there are already effects in the game. Sure, that one's small, but it still exists, so there's no reason why you couldn't do more.
  8. You've got like a dozen coremods. We can't really support you as a result.
  9. Why not just generate them anyways? It would suck to have built this awesome house underground kill a boss that spawns a structure and then go back to my beautiful house that has just been built over with a dungeon. Cough, the end portal in the end after you kill the dragon?
  10. Don't register your recipes that way. Use the JSON system.
  11. Vanilla furnace doesn't operate this way. You would need to create your own machine to do this. I did this with my Sifter and Pressure Packager. I don't use fuel (e.g. coal), however.
  12. But not Forge, so why are you on the Forge forums? Whatever that is.
  13. True enough. But if someone can't solve the "there is no constructor that takes these parameters" issue, they need to go learn Java first. There's literally only two options to fix it and they can't figure out what to do.
  14. In which case, I would do something like this: public String getActionbar() { try { return (String)overlayMessageField.get(Minecraft.getMinecraft().ingameGUI); } catch (IllegalAccessException e) { e.printStackTrace(); throw new RuntimeException("Get Message Overlay failed!"); } } If it should crash, then let it crash. Don't handle the exception, then return null, allowing other code to null-check and not crash.
  15. You shouldn't be stuffing NBT data into the item. That's why you have a Capability.
  16. As far as I can tell, Minecraft vanilla code is crashing here: double d0 = (double)y - (1.0D - this.blockaccess.getBlockState(blockpos1).getBoundingBox(this.blockaccess, blockpos1).maxY); The only thing that could even be null on this line is the return from getBoundingBox(), but the code you've shown does not override this method.
  17. This is how you post code:
  18. Yes, because that's what Minecraft does when the stack NBT changes: when the server sends the update packet, the client assumes it is a new stack and recreates it.
  19. Oh I agree it should never happen. But if there's one thing I know about programming. "Should never happen" is not as absolute as one would think.
  20. Um...ok? Do you have a question or problem you want help with?
  21. Would I rather check validate that the string returned by this function is null, or display an empty string (or the string "null")? I think I'd rather have a non-null string.
  22. Return an empty string instead of null.
  23. Or you can copy and paste the files on your computer and declare it a new repository.
  24. That's not why you use !worldIn.isRemote. You use !worldIn.isRemote when you want code that runs on both the client and the server to only run on the server.
  25. You might be interested in my sifter, then: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/recipes/OreProcessingRecipes.java (Note: I haven't converted my machines to JSON "recipe" format yet because I'm lazy)

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.