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. You also don't need the item instanceof check. All the information neccessary is already available from Item directly.
  2. I swear I tried doing that and Eclipse wouldn't let me. I probably inferred something wrong and the autocompletion was (correctly, but unhelpfully) not suggesting things or otherwise complaining.
  3. You need this function: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/EasyRegistry.java#L194-L197 Register your items in it
  4. Will be here momentarily (need to push changes, will take a few minutes) https://github.com/Draco18s/ReasonableRealism/blob/1.14.3/src/main/java/com/draco18s/harderores/HarderOres.java#L102 Done
  5. You probably aren't registering it in a RegistryEvent.Register<Item> handler.
  6. Noted. I'll give that a try. Yes. I know. That's not what I am having a problem with. ContainerType's constructor requires an IFactory parameter (which defines a create method), not an IForgeContainerType (which defines a different create method). ContainerType is already an IForgeContainerType, so either: a) I'm already doing it right and something else is wrong b) I'm doing it wrong What do I need to do to get the IForgeContainerType result?
  7. 1.14.3 or 1.14.4? And how do you register the class as an IForgeContainerType?
  8. Or if you'd like, I condensed item and block registration down to several helper methods. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/EasyRegistry.java Note that this class (and another) act as Proxy and Client Proxy, though I've done away with this in 1.13+ (note that I'm still refining things in that branch).
  9. I have that. I extended the interface, actually, but my TE still implements it. createMenu, getDisplayName, and openGUI. All the vanilla TEs implement the interface directly. I'm already using the NetworkHooks.openGui that takes in the player, container, and blockpos. But I don't see where I get that blockpos back on the client end of things.
  10. I'm trying to figure out how to set up gui containers so that the client side has a reference to the TE in question so that it can get things like the current cook time. Due to all the obfuscation behind factories and container types, I can't figure out how on earth the Furnace (and like classes) actually get injected into the Container used on the client side. For example, the Furnace gets its GuiContainer constructed using a Container that calls a constructor that does this: this(containerTypeIn, recipeTypeIn, id, playerInventoryIn, new Inventory(3), new IntArray(4)); That new Inventory(3) is what gets referenced on the client side later on as the Furnace inventory and the new IntArray(4) is used as field_217064_e, referenced in getCookProgressionScaled(). But it's a blank array! It never gets filled with any values as far as I can find. Going a step further it appears that furnaces are just plain broken (they don't smelt, at all) in the dev environment. Can anyone confirm this?
  11. Don't call new from a static location. You must do it from a Forge controlled event (such as the Register<Item> event handler) or setRegistryName won't work properly.
  12. Sorry, I was looking at the wrong place. The image getting scaled down made it hard to see the z-fighting. I'm not sure. I can't see any of the cuboids overlapping. My best suggestion is to remove all the cuboids and add them back one at a time, checking at each step to see what introduces the problem.
  13. Well yes. You have two cubes that overlap and occupy the same space. You either need to offset your strings or sticks vertically slightly, or you need to use segmented chunks.
  14. Don't use the unicode symbols, use the TextComponent classes and call setStyle passing a TextFormatting color.
  15. Not a currently known issue: https://github.com/MinecraftForge/MinecraftForge/issues?utf8=✓&q=is%3Aissue+is%3Aopen+capabilities
  16. Its called four times: Once per logical side per Hand. (Client MainHand, ClientOffHand, Server MainHand, Server OffHand)
  17. Started poking at this myself. You can't do this because CookingRecipeSerializer.IFactory is not visible (and is required for the lambda syntax to function correctly). I had to clone my own copy of CookingRecipeSerializer and AbstractCookingRecipe as well as all of the register methods vanilla uses. This is probably an ideal solution anyway, as AbstractCookingRecipe is a class that implements IRecipe<IInventory>, which should probably be changed for mod machines anyway, but we can't because of the definition of IRecipe.... I did find this comment, but it still depends on IInventory: https://gist.github.com/williewillus/353c872bcf1a6ace9921189f6100d09a#gistcomment-2939062
  18. I am interested to see where this goes. I may not actually make my machines use it (one's a grinder, it should only be 1->2 for certain items, so I don't mind having complete authority), but at the same time I probably should use it, but I didn't even know where to start, so what's in the OP is more than I had a few minutes ago.
  19. Look at what super returns, copy it, change it to return a slightly different value. I'd say "you want it to return SUCCESS" but the actual object is more complicated than that. The super method returns PASS.
  20. Eclipse can too, I've just gotten used to using Notepadd++'s file search for all kinds of things (not just Minecraft/Java).
  21. Notepad++ Find Replace In Files
  22. To compute things based on the change since the previous frame
  23. Look at the if-statement. Consider likely values. Compute the outcome in your head. If that fails, use the debugger.
  24. Option A: - The event class is registered statically, therefor the methods must be static Option B: - The event class is registered as an instance, therefor the methods must not be static Notice how the first part and the second part match? Notice how both options are possible? Event handlers are not required to be static, but you have to match.

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.