cc-tweaked / CC-Tweaked

Just another ComputerCraft fork
https://tweaked.cc
929 stars 211 forks source link

Unexpected Behavior - Plethora Inventory Wrapping & IC2 Classic #1187

Closed JordanTemrite closed 2 years ago

JordanTemrite commented 2 years ago

Minecraft Version

1.16.x

Version

1.89.2

Details

ENVIRONMENT:

openjdk version "1.8.0_342" OpenJDK Runtime Environment (build 1.8.0_342-8u342-b07-0ubuntu1~22.04-b07) OpenJDK 64-Bit Server VM (build 25.342-b07, mixed mode)

MOD VERSIONS:

minecraft_version = 1.12.2 CC Tweaked = 1.89.2 IC2 Classic = 1.5.5.2.1-technic1 Plethora Peripherals = 1.2.3

ERROR LOG:

https://mclo.gs/tsmKlVh

TO REPRODUCE:

-- 1x Computer -- 2x Modem -- Network cable -- 1x Any IC2 Machine -- Compatible Item for IC2 Machine Inventory

Connect Modem to IC2 Machine & Computer --> Wire modems --> Activate network Place the compatible item in Slot 1 of the IC2 machine inventory

IN COMPUTER LUA -->

machine = peripheral.wrap('ic2:nuclear reactor_0') machine.drop(1, 1, "any_direction")

||

machine = peripheral.wrap('ic2:nuclear reactor_0') cooler = peripheral.wrap('ic2:nuclear reactor_1') machine.pushItems(peripheral.getName(cooler), 1) or ..., 1, 1, 1)

EXPECTED BEHAVIOUR

The machine drops 1 of the item in slot 1 out of the selected face

||

The machine transfers 1 item from slot 1 to slot 1 of the other machine

ACTUAL BEHAVIOUR

CC Spits back a null pointer error and server-side prints https://mclo.gs/tsmKlVh It's only with IC2 machines that this is happening, I'm able to do the above with machines/blocks from any other mod pack I've tried.

Wojbie commented 2 years ago

CC:T for 1.12.2 is no longer under development. Also this bug should be probably put in plethora repo not this one as it's plethora that's bugging here?

SquidDev commented 2 years ago

This appears to be a bug in IC2. Their extractItem method is returning null.

I don't think IC2 is still being maintained for 1.12 (though worth checking), so I'm afraid this is unlikely to be fixed.

JordanTemrite commented 2 years ago

Awesome thanks!

Speiger commented 2 years ago

@SquidDev what "extractItem" method do you mean. Could you please elaborate?

SquidDev commented 2 years ago

Forge's IItemHandler.extractItem. Unless you don't expose that as a cap, in which case I'd assume the issue is in the underlying inventory? Afraid I've not looked at the code on your end.

JordanTemrite commented 2 years ago

Hey there @SquidDev! The wrapping issue was fixed from the IC2 api looks like, I'm able to wrap and perform most actions with IC2 machines now. When attempting inventory actions I do get valid returns but always 0 (so nothing gets moved). Would you mind taking a peek?

Speiger commented 2 years ago

They are using "Extract" while the "null" side is viewed as "Viewing side, where extraction/insertion" can be disabled. Null for TileEntities can be seen as "readOnly"

JordanTemrite commented 2 years ago

Gotcha so inventory behavior is working as intended then?

Speiger commented 2 years ago

@RugRite from ic2cs side yes. From their side the way they have implemented it yes, though they can fix this by using a different function.

JordanTemrite commented 2 years ago

Ok that's wonderful! I appreciate the time you've spent on this @Speiger and am very thankful for the update!!

JordanTemrite commented 2 years ago

I suppose while I've got you in this thread I've got another question non-bug related. I'm building up a few hundred reactors and using chunk loaders (world spikes from rail craft) to keep things loaded. When I leave the chunk my plasma cables will stop transmitting power unless one of them is broken and replaced. Is this because I need entity processing for each chunk wires are attached to or will the 3x3 chunk provided by an anchor suffice?

Speiger commented 2 years ago

@RugRite cables don't have processing. Except for detector/splitter cables, but outside of that they must just be loaded to work. Meaning that they require to be chunkloaded between source and target.

As long every chunk is loaded that the cables go through it should just work. otherwise you can make a report.

But ic2c 1.12 unless a really critical bug is found doesn't receive a patch for this year anymore.

JordanTemrite commented 2 years ago

As always, extremely helpful! Thanks for the additional info :)