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. If you can't figure out how to check one list of items against another list of items and avoid duplicates, I can't help you. You need to go learn basic Java.
  2. new LootCondition[0] is an array, you need to pass in a list of conditions (in this case, an array of size 1), not a single one, unboxed.
  3. You need to mimic what the furnace does (assuming single input + fuel) or what the crafting table does (any number of inputs or outputs greater than 1). I have something similar here: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/recipes/OreProcessingRecipes.java#L35-93
  4. You need to create a new class that extends GuiContainer. Look at the vanilla examples of such. You will also need one that extends Container (again, look at the vanilla examples). And a class that implements IGuiHandler
  5. Okay then. In any case, the code you've posted cannot destroy blocks.
  6. "Huh, I want to know if this object is the same as this other object. Maybe I should compare them."
  7. Do not use setHeldItem You want to insert or extract items from an Inventory? Step 1: Use GetCapability to get the inventory Step 2: Use the insert/extract methods to insert and extract Also, what the bollocks? Why is this method in your entity class at all?
  8. Pretty much this. We can't actually tell what's going on under the hood (without reading the code, assuming that we even understand it if we do, and that there isn't additional magic going on deep down in the JVM). We just have to accept that it does what it does in a way that does what we actually want to do. And given what you are trying to do, and what this function actually does, work at cross purposes, you shouldn't use it.
  9. Well, addCreatureType is definitely not how you examine what the possible values are.
  10. I do not get the indicated problem.
  11. That is not how that event works. For 1, your function is a void function, meaning it returns nothing and you're trying to return whatever LootTableHandler.DRAGON_LOOT is. Two, that's not what that event is for. Yes, its to modify the drops, but it does so outside the context of loot tables.
  12. Then stop using it. It does not do what you think it does (which is clearly "who knows what")
  13. You don't know what EnumHelper does, do you?
  14. It's a method in the Item class It goes in your item's class.
  15. That line cannot cause that error. Post your entire mod, preferably on a complete git repository, so I can run it.
  16. ...and which line is like 24?
  17. Override getSubItems()
  18. Caused by: java.lang.ArrayIndexOutOfBoundsException: 5 at BlockBase.java:24 You have not posted this code.
  19. You need to register the item for having a color tint as well.
  20. 1) You have to do it server side 2) Use the server's player list
  21. This thread is a year old, if it didn't solve your problem start a new thread which contains all relevant info, such as your code and any errors.
  22. That would be correct.
  23. Note that if you are on 1.11 or newer the file name should be en_us.lang (all lower case) due to pack format 3 enforcing an all lower case format for all resources.
  24. You realize "common" is both sides, right?
  25. This is the client. Not the server. This will crash the server. The only player here will be the local user.

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.