2No2Name / hopperOptimizations

A mod that optimizes hoppers and their interactions with entities and inventories. It drastically reduces hopper lag without changing any behavior.
MIT License
64 stars 9 forks source link

Incompatibility with Golden Hoppers mod #23

Closed shouxd closed 3 years ago

shouxd commented 3 years ago

Hello:) Golden Hoppers mod adds a filterable hopper, but for some reason it behaves as a normal hopper when HopperOptimizations is being used.

I asked GoldenHoppers dev about a possible compatibility fix and he said: "It would likely have to be done by the hopperOptimizations dev, probably by checking what block the hopper is to disable the optimizations or to add explicit support for golden hoppers".

Please let me know what are your considerations about this regard.

2No2Name commented 3 years ago

This way of implementing a filterable hopper is incompatible with hopper optimizations and always will be. In vanilla inventories already have a way to define which items can be inserted into them. I recommend to use exactly that way. Hopper optimizations however also currently assumes that the HopperBlockEntity accepts all items without checking, so I also need to change my code.

2No2Name commented 3 years ago

So what I can be compatible with is: Make the custom HopperBlockEntity implement SidedInventory and use the methods canExtract and canInsert to define whether an item can be moved into or moved out of a slot of the hopper.

2No2Name commented 3 years ago

This will be fixed in the next release