Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

leod

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

leod's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  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.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.