Skip to content

CC APIs taking ItemIdentifier as a parameter do not work #1

@tranquillity-codes

Description

@tranquillity-codes

When attempting to use for example the makeRequest API on a Request Pipe, the following happens:

lp = peripheral.wrap(side)
lpo = lp.getLP()
lpib = lpo.getItemIdentifierBuilder()
lpib.setItemID("minecraft:grass")
lpib.setItemData(0)
grass = lpib.build()
lp.makeRequest(grass, 1)
Java Exception Thrown:
java.lang.UnsupportedOperationException: No such method.makeRequest(logisticspipes.utils.item.ItemIdentifier, java.lang.Double, java.lang.Boolean)
makeRequest(logisticspipes.utils.item.ItemIdentifierStack)
makeRequest(logisticspipes.utils.item.ItemIdentifierStack, java.lang.Boolean)
makeRequest(logisticspipes.utils.item.ItemIdentifier, java.lang.Double)

Notes: I might be misusing the API.
[x] Worked around in PipeItemsRequestLogistics#makeRequest by slightly changing the API to work with tables directly.
[ ] Figured out what causes the parameter to not be passed in correctly or proved that it cannot.
[ ] Implemented a permanent solution on all affected APIs
[ ] Compiled a list of affected APIs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions