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.

leod

Members
  • Joined

  • Last visited

Everything posted by leod

  1. I don't think I should have to create a custom crafting block when the anvil fulfills exactly what I need and the restriction is purely a technical one. You can already rename Items in it without a center item present, so it's not like the anvil is hardcoded to never do anything at all without a center item.
  2. Line 149 in RepairContainer.java (in 1.15.2, I don't know about 1.16) checks whether the middle slot in the anvil GUI is empty, and only if it isn't the onAnvilChange ForgeHook is called, which makes is making it pretty impossible for me to implement anvil recipes that don't need an item in the center. I've had to resort to making a coremod to implement this, but I don't think it should be that way. The relevant lines look like this: if (!itemstack2.isEmpty()) { if (!ForgeHooks.onAnvilChange(this, itemstack, itemstack2, this.outputSlot, this.repairedItemName, j)) { return; } I don't think much of anything would break if the ForgeHook was to be moved in front of the first line to allow events to be sent with empty center slots. If you're wondering why I would want to do what I'm doing, it's a flavor thing for the mod I'm working on and also lets me make it cost XP to get the output item, to keep it out of the early game.
  3. So I'm trying to get a list of recipes during an AnvilUpdateEvent, but I have no clue how I would get a reference to a RecipeManager in there, since no world or anything is passed into the AnvilUpdateEvent. I've thought about keeping a reference in my class from some other event, but I don't know how I would reliably get this to happen, because I'm not sure which event to use and how the RecipeManager is used. Is there only one RecipeManager instance per client? Is it a server-only class? RecipesUpdatedEvent only seems to fire on the client, so I'm not sure how you'd go about it on the server, or if that's even necessary. In case it wasn't obvious, I'm entirely new to forge and Minecraft's source.

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.