tom5454 / LogisticsBridge

Add-On mod for AppliedEnergistics and Logistics Pipes
MIT License
9 stars 8 forks source link

Crafting Manager with Buffer Upgrade oversends to Machines #59

Open SonOfTheStars opened 4 years ago

SonOfTheStars commented 4 years ago

A crafting manager with a buffer upgrade will oversend items to a machine even after they have been buffered first, if Blocking mode can not be used or is otherwhise off. (See GTCE Extruder or Bending Machines) This causes items to bounce back and forth between default chest and the machine constantly, generating lag.

Buffer upgrade should not attempt to oversend items into an machine that is already full.

FairleyC commented 3 years ago

Can confirm, buffer will overfill the machine and items will be pushed to default route and pulled back to the machine until the the craft is finished.

I assume it's related to the default here always being true.

https://github.com/tom5454/LogisticsBridge/blob/138df35455b307191c7dfc04d0980281303fb096/src/main/java/com/tom/logisticsbridge/pipe/CraftingManager.java#L438

If instead it checked if the machine had room then it I believe it wouldn't over fill.

IInventoryUtil has a int roomForItem(@Nonnull ItemStack stack)

FairleyC commented 3 years ago

A bit of a tangent but another note about blocking.

Since playing interactions I've used Logistics Pipes significantly and one of the problems the mod pack has is that certain machines need a Programmed Circuit that isn't consumed in the recipe. The current "Blocking" mode wont work with the machines that have these recipes. An exclusion list might be great for mod-pack makers.

KorewaLidesu commented 1 year ago

Could you try this, using a backup world? This include test build of Logistics Pipes, and a custom mod test.zip

KorewaLidesu commented 1 year ago

LP handler item transfer via pipe (aka transfer with packet) Therefore no way to use roomForItem(@Nonnull ItemStack stack) if the recipe has multiple items in 1 space. Atleast what I can fixed now is that you can transfer properly with recipe that has 1 item type / per sat if there is enough space for it