gnembon / fabric-carpet

Fabric Carpet
MIT License
1.65k stars 261 forks source link

fix incompatibility with lithium explosion exposure optimization #1937

Open 2No2Name opened 5 days ago

2No2Name commented 5 days ago

Lithium redirects the same call to replace the computation with a cached value lookup.

I don't see a way to avoid lithium's redirect, without getting rid of the optimization, which is why I am suggesting to change it in carpet.

This PR uses the @Local instead of CAPTURE_FAILHARD to get the local variable, because it is easier.

I don't know how to use scarpet, so I couldn't test it, but it at least didn't crash the game when I exploded a tnt in a flat world

altrisi commented 4 days ago

You can test events by loading the built-in event_test (/script load event_test), which should print the info received by them.

I'll try to take a look and merge later.