Skip to content

Add AE2 Cell Workbench API - #219

Merged
Dream-Master merged 3 commits into
GTNewHorizons:masterfrom
Armisael5:feature/ae2-cell-workbench-api
Sep 1, 2026
Merged

Add AE2 Cell Workbench API#219
Dream-Master merged 3 commits into
GTNewHorizons:masterfrom
Armisael5:feature/ae2-cell-workbench-api

Conversation

@Armisael5

Copy link
Copy Markdown

Summary

Adds an API for the AE2 Cell Workbench which is compatible with Item, Fluid, and Essentia storage cells. Allows reading and editing of partition filters, type/amount restrictions, and oredict filter strings.

Includes the following methods

hasCell():boolean -- Returns whether a storage cell is currently inserted.
getCellType():string -- Returns the inserted cell's type ("item", "fluid", "essentia", ...). Returns nil if no cell is inserted.

getPartition():table -- Returns every partition slot as a table keyed by slot number (1-based). Empty slots are omitted.
setPartition(slot:number[, item:string OR table]):boolean -- Sets the partition in the given slot (1-based). Accepts a name, or a table for more detail (e.g. item damage). Omit the item to clear the slot.
clearPartitions():boolean -- Clears every partition slot on the inserted cell.

getRestriction():number, number -- Returns the cell's restriction as (types, amount). (0, 0) means unrestricted.
setRestriction(types:number, amount:number):boolean -- Sets the cell's restriction. (0, 0) means unrestricted.

getOreFilter():string -- Returns the inserted cell's ore filter string. Returns empty string (not nil) if unset.
setOreFilter(filter:string):boolean -- Sets the inserted cell's ore filter string.

Checklist

  • I have tested this PR in DevEnv
  • I have tested this PR in Fullpack
  • This PR is in compliance with the GTNH AI Policy
  • This PR requires another PR in order to merge

@Dream-Master
Dream-Master requested a review from hinyb August 31, 2026 19:16
Comment thread src/main/scala/li/cil/oc/integration/appeng/AEUtil.scala Outdated
Comment thread src/main/scala/li/cil/oc/integration/appeng/DriverCellWorkbench.scala Outdated
@Armisael5
Armisael5 requested a review from hinyb September 1, 2026 04:58

@hinyb hinyb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the contribution!

@Dream-Master
Dream-Master merged commit 971815a into GTNewHorizons:master Sep 1, 2026
1 check passed
@Armisael5

Copy link
Copy Markdown
Author

LGTM! Thanks for the contribution!

Thank you for reviewing :)

@Armisael5
Armisael5 deleted the feature/ae2-cell-workbench-api branch September 1, 2026 05:11
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.

3 participants