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.

UberWaffe

Members
  • Joined

  • Last visited

Everything posted by UberWaffe

  1. If the reflection method is the prescribed one, then cool. I'll use it. Thanks for the reply. [EDIT] Reflection working fine. Ore dictionary support tested and working. Thanks for the help. [/EDIT]
  2. I've made a fork of LepkoQQ EasyCraft mod (https://github.com/UberWaffe/EasyCrafting), and in my own capacity I've been trying to add Forge ore dictionary support into it. I looked into "ShapedOreRecipe.java", since I need to grab the list of ingredients a recipe is made up of. I need this in order to be able to do a scan of the player's inventory for the ingredients (or their equivalents). This check in turn determines what easycraft recipes are allowed (you have the stuff needed to craft them). But I've hit a bit of a wall with getting the "private Object[] input = null;" field data, because of that little hiccup in bold. It's private. Which in itself is not an issue, except there is also no function in the class to expose a copy of the data inside the "input" field. A Google search revealed that one can use reflection and other tricks to get access to a private variable, but these seem to be more on the "I'm-hacking-this-to-bits-now" approach. Is there something obvious I am missing, or is there just no allowance made for checking the ingredients for an ore dictionary recipe? I've noted functions for checking if the items in a given crafting grid are equal to the recipe, but this is not entirely what I want. There is no crafting grid... well, at least not in the easycraft mod's easycraft table. [EDIT] I've managed to do all the other coding work for supporting Object[] recipes. (New commit on Github). So I'm going ahead with creating a manual list of ore-dictionary recipes (as sucky as that is), since I do not wish to mess around with java security to get reflection to work for private variables. Still, if anyone knows of a better way, please let me know. I'd love to automatically clone and convert all ore dictionary recipes (i.e. automatic mod support of other mods). [/EDIT]

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.