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. The last two lines in the ModItems and ModBlocks are important here. We need to know what order those are called in. Because you have them as part of the static class initialization, rather than as a method, we cannot know what order they are called in nor can we change that order. Secondly, you do this: ItemPPSeed tomatoseed = new(ModBlocks.tomatocrop); BlockPPCrop tomatocrop = new(ModItems.tomatoseed); Each of those lines is referencing the other ONE OF THEM WILL BE NULL! So you're storing null in a private field. There's a much better way of doing this. protected Item getSeed() { return ModItems.tomatoseed; //magic }
  2. Yes! In Eclipse, hover over the class declaration of Block and then click the little green button in the tooltip that pops up (aka "Jump to Definition") Magic! Or you can do: Block b; b. And another tooltip will pop up called the intellisense autocomplete which will list every god damn method and property available for that object. Events, by the way, are not functions. They're events and you need to write an Event Handler to handle them (which is a class containing methods). Search Google for "Forge Events" and the first link will be a link to the wiki called "Forge Event Reference."
  3. ...Minecraft Development Kit
  4. Hand doesn't have a harvest level. There's simply a check to see if the player is allowed to harvest a material without needing a tool. If so, the block is always harvested, regardless of how the player broke it (hand, wrong tool, correct tool, or with a random item), and is harvested with a x5 speed bonus (this is why it takes so long to break stone by hand, even though Stone and Wood have the same hardness). Setting the harvest level to 0 (or higher) is for the tool-speed-multiplier lookup. This is why digging with a wooden shovel is faster than by hand but not by much: dirt can already be harvested by hand and already benefits from the "can harvest: x5 speed" bonus, whereas using a wooden shovel adds another x2 (taking it from 0.9 seconds to 0.45 per block).
  5. Do note that a harvest level of 0 (wood tools) is not sufficient to prevent blocks from being dropped when mined by hand.
  6. There are a few concepts that aren't making it across the translation barrier. The first has to do with programming in general (not that I think that jmylifecolor doesn't know java or how to program, but rather that the terminology itself may not be translating correctly). The second has to deal with event handlers, which are a little arcane if you haven't used them before.
  7. someVariable.class ?
  8. Please go into your airplane and flip the red lever.
  9. Well, some of us don't have time to read your mind. It's a lot of work.
  10. 0) use github 1) yoir json is malformed
  11. I so not need your code because I am psychic. Your widget is missing a thingamajig and it's vomiting all over the processor. (Hint: always post code, especially the class mentioned in the crash, ScreenCompressor)
  12. So if light is 0 to 15, and 1.0f corresponds to 15 and it bit-overflows, what happens is we double that?
  13. Are you doing it client side or server side?
  14. In fact, returning null is a bad idea.
  15. What happens when the player does not have an item in that slot?
  16. The log knows all. One on the client, one on the server. SSP does still have both.
  17. Ooh, you want it to LOOK like it is fully lit without actually emitting light. That's trickier, but involves rendering the block yourself.
  18. Null error exceptions are ready to fix. He even told you what object is null.
  19. So where can I read about those types? I am GL noob in terms of conventions. Everything I know i learned from scratch (a lot actually). Look for some GL tutorials. If you hover over GL11.GL_QUADS you can do a jump-to-definition which will take you to the GL11 class and you can look at the other modes there (I can't find a list online). QUADS is more or less deprecated because it's inefficient, but no one in Minecraft modding cares (it's faster to draw two triangles than making the CPU calculate said triangles). The other options I can remember are... LINES (may not work, use instead...), LINE_STRIP, and TRIANGLE_STRIP.
  20. Save the config to a static variable in your main class. Access it from anywhere.
  21. I know that one of the parameters for WorldRenderer is the GL draw type. GL11.GL_QUADS, etc.
  22. Lighter than air fluids are hilarious~ (I've got one, but its also finite and flammable. We've had so much fun with it.)
  23. Even SSP there are still multiple dimensions loaded (the game automagically generates and holds a portion of the Nether active if you have a Nether portal).

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.