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. Poked around in C# (my Unity3D project) seeing if it had nullable parameters and it does, but for the simple types (e.g. someMethod(int? nullableIntVar){} ) but not for the complex types, as complex objects can already be assumed to be capable of being null. So the project I was working in that had a "[ x ]OrNull" parameter was justified in making the name indicate that the method could handle null values being pased vs. a "this object must not be null" method. I should note that the .NET version for Unity is garbage: 2.0, updating to a newer version is under the "research" category on the roadmap. I.e. not even on the "long term development" track yet, much less the next two releases.
  2. I love copy pasta. You have so much crap that you either need to remove or rename so you can figure out what this class does and why you have the problem you have.
  3. You can blame random people using MCPBot for that. I find that more often than not that's enough. Forge-specific comments are much better than the ones on vanilla methods.
  4. I didn't know about @Nullable. Not that I'm surprised. The thing I was talking about was a function parameter not a return value on an interface. For example, using the OP's method: public void EntityTNTPrimed(World worldIn, double x, double y, double z, EntityLivingBase igniterOrNull) {...} Is there a cleaner way of doing it there? The point I was trying to raise is "MCP could note this kind of stuff and it would be useful." (I just don't care how)
  5. Other project I was working with named a paramter like that as "[ x ]OrNull" e.g. "igniterOrNull" to make it clear that it was a parameter that wouldn't throw NPE if you passed in null, as it was intended to handle such things.
  6. I did, I was still wanting to inform you what you were doing wrong. Also, read my sig, thanks.
  7. You're trying to declare a class variable in a location that only local variables are allowed. Go learn Java programming.
  8. The upside down shader is his hack around doing it the right way. He wants to h have a dimension that would be like digging around on the underside of a floating island, with the sun below him.
  9. Yes, Forge has documentation. It is called in-source Javadoc.
  10. You are creating itemstacks at class-instantiaion, before your items have been created and registered. Those stacks are stacks of null and cannot be rendered or used in recipes.
  11. You need to write your own sky renderer. Shouldn't be very hard. You'll also want to turn off void fog.
  12. Go to the edit button, click it, put [spoiler ] at the beginning, and [/spoiler ] at the end, remove the spaces.
  13. IIRC, the lookup ("find this field/method") is the most expensive portion, but the rest of it is more costly than direct access. But a single per-tick field.setValue() or method.invoke() isn't going to be noticeable. The reason it matters for Forge events is because there are potentially thousands of them running per-tick.
  14. Props on making it, too. Modding Minecraft has seriously been one of the most enjoyable programming experiences I've ever had. Everything is laid out so well with incredibly intuitive and easy to use systems that let me hook into nearly everything. I've had to coremod a few things, but they were things that have either been turned down (an event for when the player feeds animals...I still don't understand that one getting declined*) or don't have a general-purpose use (modifying the overworld moon phase calculation, an event for crop growth ticks, tweaking silverfish to enter custom blocks (actually that one might be worth trying to patch into Forge), couple other things). *I was told that the method that sets animals into love mode (func_146082_f) never got an event because there were other ways to get at what it does. And while true, my usecase needed to specifically detect the player setting the animal into love mode, rather than it coming from another source. I wanted to make it take more food to feed an animal before it would breed, but also make animals go into love mode on their own. If I couldn't detect that it was a player setting love mode, vs. it being from an AI task, then I coudn't achieve the effect I wanted.
  15. Gotcha. I figured that was why, but didn't see how the angle of rotation put it behind the player rather than in front. Huh.
  16. Mm, degrees and radains. Don't know why you had to subtract pi though.
  17. Use TickEvent.WorldTickEvent, unless they broke that out (not an internal subtype) for 1.8
  18. A does not imply B here. What calls this method?
  19. (newPosX + - 4, d1, newPosZ + 4); Wha?
  20. What for? The class is already only ever going to get loaded on the client. If the class gets loaded on the server, those annotations aren't going to keep the server from vomiting ClassNotFoundExceptions
  21. implement ITileEntityProvider and override its methods.
  22. Ohgodno. Reflection is awful.
  23. That can be simplified. E.g. by removing it entirely, because you're only going to get 1 item stack from that loop, so why bother with a loop?

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.