Applied Energistics 2

Applied Energistics 2

156M Downloads

API - Crafting CPU job cancelation

SirEndii opened this issue ยท 0 comments

commented

Describe the feature

I currently search for a way to cancel a crafting job of a CPU while filtering for a specific output item of a job.

Looking at how the crafting cpus work, I see that there are CraftingCPULogic classes. Every CraftingCPUCluster has one CraftingCPULogic instance, while every CraftingBlockEntity has a reference to its cluster.

So my initial thought was to iterate through all CraftingBlockEntities, retrieve the cluster, check if the logic currently crafts the Item I am searching for and then call CraftingCPUCluster#cancel

But that's where I noticed that the Cluster is the place where ICraftingCPU is implemented. So I just thought about adding the cancel method to ICraftingCPU. And since CraftingCPUCluster already has a public cancel method, there wouldn't be any more work to do besides some java docs.

Reasons why it should be considered

AE2 already exposes the ICraftingCPUs via the ICraftingService service in a simple fashion, but canceling is currently not possible in a simple way.

Additional details

I would consider making a PR for this if the AE2 Team would approve my idea ๐Ÿš€