Skip to content

fix fluid storage bus resetCache spam - #588

Open
kurrycat2004 wants to merge 1 commit into
AE2-UEL:masterfrom
kurrycat2004:fix-fluid-storage-bus
Open

fix fluid storage bus resetCache spam#588
kurrycat2004 wants to merge 1 commit into
AE2-UEL:masterfrom
kurrycat2004:fix-fluid-storage-bus

Conversation

@kurrycat2004

Copy link
Copy Markdown

onNeighborChanged gets called when the connected block changes, which happens a lot if you for example have a FluidStorageBus connected to a FluidInterface with stocked fluids.
What will happen before this change using this setup is that every time the FluidStorageBus pulls fluids from the FluidInterface, the FluidInterface will markDirty() which causes an onNeighborChanged of the FluidStorageBus, which in turn will call resetCache(), because its a FluidInterface it is next to.

Now the normal item StorageBus already handles it correctly: comparing the handler hash before the resetCache call, which will correctly skip the resetCache in the described setup.

This PR simply copies the same behaviour 1 to 1 to the FluidStorageBus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant