FabricMC / yarn

Libre Minecraft mappings, free to use for everyone. No exceptions.
Creative Commons Zero v1.0 Universal
921 stars 380 forks source link

RuntimeException: Unfixable conflicts #3498

Closed Bixilon closed 4 months ago

Bixilon commented 1 year ago

As already stated in https://github.com/FabricMC/yarn/commit/c8db3052f151b7c6e1111aed63ca8b9c2b359637, tiny remapper always crashes on my side with:

  net/minecraft/class_1297 METHOD method_37908 (()Lnet/minecraft/class_1937;) -> [net/minecraft/class_1297/getWorld, net/minecraft/class_1297/method_48926]
  net/minecraft/class_3222 METHOD method_37908 (()Lnet/minecraft/class_1937;) -> [net/minecraft/class_3222/getWorld, net/minecraft/class_1297/method_48926]

I have no clue why this happens, it this a problem with tiny remapper or something in the mappings?

Thanks

Bixilon commented 1 year ago

@modmuss50 Any updates on this? It is getting quite annoying to run gradle every time. I might rewrite mine to use gradle...

Chocohead commented 1 year ago

Are you always running Tiny Remapper with --resolvemissing?

Bixilon commented 1 year ago

Yes, I do. It seems to work without it, but that does not fix "the bug" 100%.

Chocohead commented 1 year ago

The significance is that nothing in Fabric currently uses resolveMissing (as far as I'm aware). Hence you're seeing problems which haven't been seen elsewhere.

Whether these problems are caused by Enigma failing to declare an override it should/needs to, or because Tiny Remapper is misbehaving I don't know. But it at least narrows the problem down to using resolveMissing from 23w06a onwards.

Chocohead commented 1 year ago

I've had a closer look at what might be the problem.

TameableEntity implements Tameable#method_48926 through a synthetic method:

public EntityView method_48926() {
    return super.getWorld();
}

In effectively (but not strictly actually) bridging Tameable#method_48926 to Entity#getWorld, Tiny Remapper concludes they must be named the same. Presumably Yarn naming method_48926 getWorld will satisfy this, so long as Tiny Remapper doesn't then complain remapping TameableEntity#getWorld back to Intermediary is ambiguous (which it slightly would be). In such a case this would need a fix in Tiny Remapper to correctly recognise the fact the names don't have to be the same in bytecode.

The conflict reported for ServerPlayerEntity#getWorld is just a result of overriding Entity#getWorld (which is the actual conflict "cause") to return a ServerWorld.

modmuss50 commented 4 months ago

I believe this was fixed by https://github.com/FabricMC/yarn/commit/70d538edef690bc70666bc477ce43537c3aaf568

Please let me know if there are still issues. 👍