CaffeineMC / lithium-fabric

A Fabric mod designed to improve the general performance of Minecraft without breaking things
GNU Lesser General Public License v3.0
1.94k stars 189 forks source link

Default config is incompatible with Fabrication minor mechanic #517

Open skymen opened 6 months ago

skymen commented 6 months ago

Hi,

Fabrication got a new feature recently for refueling furnace minecarts with hoppers, however it seems to be incompatible with lithium's default config for hopper optimisations.

https://github.com/FalsehoodMC/Fabrication/issues/718

In the config, disabling this rule fixes the issue: mixin.block.hopper However, it seems that this disables every hopper optimisations when realistically, only this specific optimisation seems to be at fault: https://github.com/CaffeineMC/lithium-fabric/blob/44f4330b9ab1cef568e80336d949c61386f747b9/src/main/java/me/jellysquid/mods/lithium/mixin/block/hopper/AbstractMinecartEntityMixin.java

(this is a conjecture from reading the code, I didn't actually debug the game or remove the optimisation manually to see if it fixes it)

Here is the relevant code from the Fabrication mod that's affected by the issue: https://github.com/FalsehoodMC/Fabrication/blob/3.0/1.18/src/main/java/com/unascribed/fabrication/mixin/d_minor_mechanics/furnace_minecart_resupplying/MixinHopperBlockEntity.java#L31


Version Information

lithium-fabric-mc1.20.1-0.11.2

Expected Behavior

Fabrication method should be triggered without having to disable every other optimisation, and ideally there should be a way for Fabrication to ask Lithium to change a config rule

Actual Behavior

User has to disable all hopper optimisations for it to work

Reproduction Steps

1- Install both mods 2- Enable "refueling furnace minecart" minor mechanic in Fabrication config 3- Place a rail down with a hopper with fuel pointing into it 4- Place furnace minecart on rail

Other Information

Any info not outlined here can be found in the original Fabrication issue https://github.com/FalsehoodMC/Fabrication/issues/718

2No2Name commented 6 months ago

Thank you for your report.

Lithium has another feature that makes block entities (including hoppers) sleep under certain conditions, with certain events waking them up again (e.g. an inventory entity moving nearby). This might be incompatible with the additional hopper feature, because the sleeping and waking conditions are not implemented. I suggest testing with the line mixin.world.block_entity_ticking.sleeping.hopper=false added to the lithium.properties file in the config folder in the .minecraft folder. If that fixes the issue, please mention it here or in the original issue report