Kir-Antipov / sync-fabric

One mind. Many bodies.
MIT License
18 stars 14 forks source link

[Crash] Create Steam n' Rails [BUG] #40

Open Cartrigger opened 1 year ago

Cartrigger commented 1 year ago

What were you doing when the crash occured?

I was trying to start my game with Create Steam n' Rails, and it crashes.

Did the crash occur client-side or server-side?

Client

Version

sync-mc1.19.1-4.3

Minecraft Version

1.19.2

Fabric API Version

fabric-api-0.76.1+1.19.2

Installation Source

Modrinth

Logs

https://mclo.gs/Hng9Uhn

Other Mods

Create, Sodium, Indium, Create Steam n Rails (the issue.)

Additional Information

Using PrismLauncher

The issue says its standalone Create, but when SNR is not loaded, it starts with this log.

Kir-Antipov commented 1 year ago

org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Redirector getFocusedEntity(Lnet/minecraft/class_4184;)Lnet/minecraft/class_1297; in sync.mixins.json:WorldRendererMixin from mod sync failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap sync-mc1.19.1-refmap.json

Yeah, that's kinda on me. This is the conflicting mixin:

https://github.com/Kir-Antipov/sync-fabric/blob/e821350f37576909751053ec39fba3f15b852689/src/main/java/dev/kir/sync/mixin/WorldRendererMixin.java#L30-L40

Basically, we should never use Redirects and other intrusive mixins, but this the only way I could make a shell to be rendered whenever the camera leaves player's body.

I will think about how I can fix that.

IThundxr commented 6 months ago

org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Redirector getFocusedEntity(Lnet/minecraft/class_4184;)Lnet/minecraft/class_1297; in sync.mixins.json:WorldRendererMixin from mod sync failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap sync-mc1.19.1-refmap.json

Yeah, that's kinda on me. This is the conflicting mixin:

https://github.com/Kir-Antipov/sync-fabric/blob/e821350f37576909751053ec39fba3f15b852689/src/main/java/dev/kir/sync/mixin/WorldRendererMixin.java#L30-L40

Basically, we should never use Redirects and other intrusive mixins, but this the only way I could make a shell to be rendered whenever the camera leaves player's body.

I will think about how I can fix that.

Use https://github.com/LlamaLad7/MixinExtras/wiki/WrapOperation

Kir-Antipov commented 6 months ago

Yep, thankfully this is the solution now, since MixinExtras are bundled with Fabric, Quilt, and NeoForge. However, this issue was opened long before this became a reality ;)

IThundxr commented 6 months ago

Yep, thankfully this is the solution now, since MixinExtras are bundled with Fabric, Quilt, and NeoForge. However, this issue was opened long before this became a reality ;)

You were always able to JiJ Mixin extras.

Kir-Antipov commented 6 months ago

Not really. Please, never use third-party mixins unless they are widely accepted by the community as a whole. Even if they seem super-duper cool and make your life easier, for somebody else this will turn out as a huge headache and a wasted weekend spent trying to catch an esoteric problem that had nothing to do with this particular someone's code in the first place.

IThundxr commented 6 months ago

Not really. Please, never use third-party mixins unless they are widely accepted by the community as a whole. Even if they seem super-duper cool and make your life easier, for somebody else this will turn out as a huge headache and a wasted weekend spent trying to catch an esoteric problem that had nothing to do with this particular someone's code in the first place.

Yep this is the general rule I use however Mixin extras has been widely used for quite a while now and not really a random thing, hence why they are being included in neoforge and fabric now, they are also more stackable making it much easier for people to write mixins into the same place.

Kir-Antipov commented 6 months ago

they are also more stackable making it much easier for people to write mixins into the same place

Yup-yup, I already happily use them in my other projects, so I'm very glad that they are an official part of the modding scene now :)