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. Probably because ModelLoader itself (while in a client package) isn't marked SideOnly, but its parent class is. This means the JVM can find ModelLoader and the server is fine. But! There's no guarantee that that won't change suddenly and unexpectedly in the future. You're safest assuming that client stuff only happens on the client than saying "works for me." Because at some point, it suddenly won't, and you won't know why.
  2. How equal are item stacks? Item: yes Metadata: maybe (tools vs. dye) Stack size: unlikely (but maybe you do care, eg. recipes) NBT data: sometimes (depends on the item and the NBT tag) Ergo you need more than one way to compare.
  3. That has nothing to do with it. Pretend you are the JVM. When you load a class you need to check that the class contains valid code. Ie that every referenced class with its already loaded or can be found and loaded if it is needed. The JVM cannot predict whether or not a given method will execute, so it assumes that all of them will at some point. The JVM scans through your class, finds a reference to a ModelRegistryEvent, attempts to locate this class, and fails to do so.
  4. Probably create a custom IRecipe implementation (you can subclass the existing ones).
  5. The magic of packets
  6. NBT is not relevant, but yes, you will need to save and synchronize just as you always have.
  7. To be compatible with things like hoppers? NBT has nothing to do with anything. IItemStackHandler is also saved to NBT. TileEntities do not operate on NBT at runtime, NBT is for serialization and serialization only.
  8. Nope. I need to update to that method, but I haven't gotten around to it yet.
  9. You're setting awake on the server. You're expecting the client to render something. You need to tell the client that the data has changed.
  10. I'd use an IItemStackHandler (the capability) in order to provide the capability to "handle items" with a single slot containing a 1-size stack of whatever's stored. Then you store an integer normally that actually tracks how many are stored.
  11. They aren't. The obsolete part is the GameRegistry. They've been deprecated in favor of the Registry<T> events.
  12. These are not the same object.
  13. If you don't mind a slightly obsolete method of doing things https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/EasyRegistry.java https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java These classes are proxy/client proxy. It makes registering blocks and items very similar to how it was done in 1.7 Also note that these lines are just a reference back to the main mod class so that static methods can be used instead.
  14. Have you looked at how reeds, doors, cakes, redstone dust, and so on work?
  15. "AL lib: (EE) alc_cleanup" isn't your problem. A clean exit will display that message too. In addition to the above, use a god damn spoiler tag.
  16. I would be more amused if you returned Float.MIN_VALUE (the smallest, positive value representable) instead of 0.
  17. For development? Latest. Recommended is more for players.
  18. Also, you should always register all items and blocks, regardless.
  19. Also, you can use item.getRegistryName() instead "zocrpmod:" + itemName
  20. Step 1: Create a new class Step 2: Use the sustitution/override system to replace the vanilla instance with your own instance
  21. A lot of people post "I have problem" and don't post code or error and expect us to help merely by recognizing a vague description of the problem. So I end up writing a lot of witty retorts.
  22. Ah, yes, I see the problem. On line 109 in your Render class you perform an illegal action. You should do this:
  23. You mean the substitution alias system. That's not override.
  24. 1) GameRegistry.registerItem(item, itemName) is deprecated. That's why it has a line through it, use the new Registry events instead. 2) Minecraft.getMinecraft().getRenderItem().getItemModelMesher()... is bad, use ModelLoader.setCustomModelResourceLocation(...) instead. 3) The error is in getArmorResource of LayerArmorBase which means that you did not correctly override something you needed to.
  25. Awful, awful, terrible, no good, very bad things. But we can't tell, because you haven't posted all of the code involved. Liiiike your AchievementBookItem class where you declare getModelLocation()

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.