SwitchCraftCC / sc-peripherals

Custom peripherals for the SwitchCraft server
MIT License
10 stars 9 forks source link

Computers cannot access 3D printer slots #4

Closed Lemmmy closed 1 year ago

Lemmmy commented 1 year ago

The printer is not exposed as a generic inventory

Lemmmy commented 1 year ago

If my understanding is correct then this is not going to be trivial to fix:

There are a few different approaches to this now:

Wojbie commented 1 year ago

But if i understand right you can still use IPeripheral peripherals as targets for inventory methods right (it works with turtles)? So one could call chest.pushItems(Printername,1) ?

Lemmmy commented 1 year ago

I believe so, but not because it's an IPeripheral, but rather because it's an Inventory (Container in mojmap)

https://github.com/cc-tweaked/CC-Tweaked/blob/2e5cd29e12db67c925c4ce5bd114c62d1bbae438/projects/fabric/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/InventoryMethods.java#L139

Wojbie commented 1 year ago

So.. would making printer a container solve/alleviate this issue? Is that even feasible without some bodge code?

Lemmmy commented 1 year ago

It is a container

image

I guess there's two issues at play here then