Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE]: Inventory peripherals are incompatible with CC:T's built-in implementation #5

Open
SquidDev opened this issue Sep 23, 2024 · 3 comments
Assignees
Labels
confirmed bug/issue has been confirmed by one of the devs, and was able to reporduce it good first issue Good for newcomers

Comments

@SquidDev
Copy link

Mod Version
1.0.1-beta

Describe the bug
KubeJS+CC:Tweaked provides its own implementation of CC:T's inventory peripherals. However, this implementation has several incompatibilities with the original, meaning that programs that work with just CC:T do not work with KubeJS+CC:Tweaked when installed.

  • Peripherals will always be called inventory rather than their block entity name (e.g. inventory_0 rather than minecraft:chest_0.
  • Optional arguments are not correctly handled — pushItems("inventory_1", 1, nil, 1) should run fine, but instead throws an error that the limit parameter must be a number.

This problem is exacerbated by the fact that KubeJS provides its implementation of the generic peripherals for all block entities, not just those where a Javascript method has been written.

To Reproduce/Expected behaviour

  1. Place a computer and (full block) wired modem down, then place two chests on either side of the modem.
  2. Right click the modem, observe that the peripherals are incorrectly called inventory_N, rather than minecraft:chest_N.
  3. Write a program to move an item from slot 1 of the first inventory to slot 1 of the second (e.g. peripheral.wrap("inventory_0").pushItems("inventory_1", 1, nil, 1). This should run, but instead errors with "Limit must be an invalid integer".

Additional context
Ideally this mod would sit on top of the generic peripheral system, rather than wholesale replacing it. That's currently not possible, but I'm definitely happy to discuss what changes would be needed on CC:T's side to make it so.

@wolfieboy09 wolfieboy09 self-assigned this Sep 23, 2024
@wolfieboy09 wolfieboy09 added good first issue Good for newcomers confirmed bug/issue has been confirmed by one of the devs, and was able to reporduce it labels Sep 23, 2024
@wolfieboy09
Copy link
Owner

Question, what MC version are you on?

@SquidDev
Copy link
Author

SquidDev commented Sep 23, 2024

Forge 1.20.1

@wolfieboy09
Copy link
Owner

Thanks for that. Been talking with the other developer. We have located what the problem was, and we will look into fixing it when we have the time. We also really appreciate you being open to finding another way to make our peripherals co-exist with the generic ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed bug/issue has been confirmed by one of the devs, and was able to reporduce it good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants