Advanced Peripherals

Advanced Peripherals

29M Downloads

[ME Bridge] isItemCrafting not working as hinted by documentation

LauJosefsen opened this issue ยท 2 comments

commented

Descripe

Hi again!

I have found that the method isItemCrafting probably does not do what most users would expect. I can see internally the AE2 api isRequested is used, however that API seems to only return true if the item is currently crafting, and not "scheduled"

What I'm trying to say is, if you craft, for example, a stone button. The ME system might need to smelt some stone first. While the stone is smelting, isRequested for stone button will return false. Reading the documentation of your mod, I don't think this is intended behavior, as a job for stone button does in fact request.

If wanting to fix, I propose iterating through crafting CPUs to see what they are crafting. Something like this: LauJosefsen/AdvancedPeripherals@fix-items-not-being-craftable-if-0-stock...LauJosefsen:isItemCrafting_fix_by_iterating_cpus

Hope I don't annoy you with these issues ๐Ÿ˜„

Steps to reproduce

  1. Setup a crafting pattern for stone button in ME system
  2. Setup a smelting pattern for cobblestone-stone in ME system
  3. While the system is waiting for stone (and the status in the me system is "scheduled"), `isItemCrafting({name="minecraft:stone_button"}) will return false.

Multiplayer?

No

Version

Own compiled build.

Minecraft, Forge and maybe other related mods versions

Forge 40.1.0, Minecraft 1.18.2, AE2 11.0.0-alpha.6

Screenshots or Videos

No response

Crashlog/log

No response

commented

reopen until released

commented

Fixed in 0.7.14b