cc-tweaked / CC-Tweaked

Just another ComputerCraft fork
https://tweaked.cc
882 stars 206 forks source link

Printer gives wrong field calls #1835

Closed Jannik24 closed 1 month ago

Jannik24 commented 1 month ago

Minecraft Version

1.20.x

Version

1.110.3

Details

At beginning i wanted to print using the code from the CC:Tweaked Wiki Then i've noticed "printer.newPage()" gives a attempt to field call (nil value)

I've tested a bit and comes to the conclusion, Printer has wrong field calls For reproduction, with help of ChatGPT: This is a code that checks every side if there is a printer, then checks the Field Calls https://pastebin.com/Kd4hFHfa

ChatGPT says: "The output you provided indicates that the peripheral you wrapped is not a printer but an inventory-like peripheral, such as a chest, storage system, or something similar. This is why you see methods related to item handling (pullItems, getItemDetail, list, getItemLimit, pushItems, size) instead of the printer methods (newPage, write, endPage)."

Bild_2024-05-21_231052886 If this is not fixed, then Computercraft gives "printer.newPage()" a nil value

(I'm not 100% sure if this is exactly the problem and maybe i could be completely wrong, but on attempt to call field "printer.newPage" gives a nil value)

SquidDev commented 1 month ago

Thanks for the report! Assuming you have Optifine installed, this is a duplicate of #1458. I'd recommend removing Optifine, and replacing it with more stable/reliable mod like Occulus.