Parchment icon indicating copy to clipboard operation
Parchment copied to clipboard

Mapping error on a few of the methods in AbstractFurnaceBlockEntity

Open pupnewfster opened this issue 1 year ago • 1 comments
trafficstars

Minecraft version: 1.20.4 (but I am using mappings for 1.20.3) Mappings version: 2023.12.31

The parameters for AbstractFurnaceBlockEntity#canBurn and AbstractFurnaceBlockEntity#burn seem to be shifted left by one:

boolean canBurn(RegistryAccess pRecipe, @Nullable RecipeHolder<?> pInventory, NonNullList<ItemStack> pMaxStackSize, int p_155008_)
boolean burn(RegistryAccess pRecipe, @Nullable RecipeHolder<?> pInventory, NonNullList<ItemStack> pMaxStackSize, int p_267157_)

It seems like it should be registryAccess for the first parameters and then all the other names are basically fine if you shift them to the right by one.

pupnewfster avatar Jan 23 '24 21:01 pupnewfster

NeoForge patches those methods to make them instance methods instead of static methods, which means that LVTs get right-shifted by one as the local this variable is placed at index 0. The mapping is correct, and right now there's nothing we can do to fix it.

Matyrobbrt avatar Jan 24 '24 17:01 Matyrobbrt

This is technically a problem on NeoForge's side, since we at Parchment can't reasonably account for the changes in method descriptors that loaders or mods might do.

This will have to be resolved at NeoForge (which I see that PR which mentions this issue aims to do).

sciwhiz12 avatar Apr 10 '24 09:04 sciwhiz12