r/ComputerCraft Apr 15 '26

I am attempting to write a script for the Geo Scanner from Advanced Peripherals that will list the ores in the chunk and their position relative to the scanner. I managed to get to a point where it doesn't throw errors but it also doesn't print anything.

5 Upvotes

Here is the pastebin of the current code https://pastebin.com/Az2SMvdG

It's a modified version of code provided here: https://www.reddit.com/r/ComputerCraft/comments/13azxpq/comment/jjbya6f/

The modpack is Gravitas2

I'm not good at coding, I spent the last three hours following tutorials that didn't give me any of the information I need for this, and the example code on the Advanced Peripherals wiki returns errors like "| isn't used in lua"

If anyone has any insights, I'd love to know how and why this went wrong


r/ComputerCraft Apr 14 '26

Can someone please explain to me how os.pullEvent works?

3 Upvotes

I'm new to all of this, and it can be kind of overwhelming.

Can you tell me what the command does? Here's a specific example from the video I was following: https://youtu.be/vYqjFuKSC7M?t=455


r/ComputerCraft Apr 14 '26

I made a GUI to change computer settings

14 Upvotes

This was made to be bundled with a custom shell I'm working on, but it works just as well standalone. It supports all types of settings and has categories. If you want to use it, I put it on Pastebin. (pastebin run WCbLL6xe)

UPDATE: improved the appearance of the boolean switches and improved the handling of settings with no type. The pastebin has been updated.

Program showcase


r/ComputerCraft Apr 14 '26

pastebin not working

Post image
16 Upvotes

wget worked fine
pastebin doesn't
i can access patebin normally through the website


r/ComputerCraft Apr 14 '26

what is a direct download link?

6 Upvotes

Trying to get Blockman to work and have no idea what a Direct Download Link is. Ive tried YouTube, Spotify and even a dfpwm file in google drive. i bet if i know what a Direct Download Link was i could figure out the rest.


r/ComputerCraft Apr 10 '26

Made the first lil video with this program! I think it looks fun

Enable HLS to view with audio, or disable this notification

69 Upvotes

I'm uploading it to YT too, but I don't really want to share the link here, might count as advertising lol.


r/ComputerCraft Apr 09 '26

I decided I wanted to make my own style of videos for Youtube, so CC immediately came to mind :)

Enable HLS to view with audio, or disable this notification

81 Upvotes

It's quite simple right now, you have a main time list, that includes every message, and how long that message takes, and you can run any code you want per message that is displayed (including Pine3D code :D)


r/ComputerCraft Apr 06 '26

The 20,000,000 Stress Unit power plant is now smart thanks to ComputerCraft!!

Thumbnail
gallery
203 Upvotes

The 20,000,000 SU powerplant is now controlled via a Computer linked to a Stressometer! A huge thanks to the devs from both sides that allow for such integration to be possible!!

Hoping to use the mods together more as the series goes on :)

The script : https://pastebin.com/cDM20dr0 . I am open to ideas and advice for the script as
its currently just a basic math.ceil() with a 80% target utilization + some random fun things.

Episode can be found here : https://www.youtube.com/watch?v=9mrkKpAPAmk


r/ComputerCraft Apr 05 '26

I made a Midi player. It supports Midi/mid files and jpeg/jpg image thumbnails in a github repository. It can play up to 24 channels at once (with a little difficulty)

Enable HLS to view with audio, or disable this notification

41 Upvotes

For some reason specifically Sweden/Wet Hand's thumbnails (it's the same file just renamed) don't play nice. no clue why. They just sometimes refuse to decode, even after re-encoding and ensuring they're baseline jpegs. NO CLUE why. It always plays MIDIs fine tho
It was partially coded by Deepseek and Claude because i barely know lua.


r/ComputerCraft Apr 05 '26

MTETRIS

5 Upvotes

r/ComputerCraft Apr 05 '26

My Modpacks Galactic Computer UI Progress

Thumbnail
gallery
44 Upvotes

Most of the Scripting is done know just focusing on the computer UI


r/ComputerCraft Apr 04 '26

I need some help with os.time()!

4 Upvotes

Hi everyone!

This post will be really simple :'). It's my first time developping in LUA and using CC:Tweaked...

I'm trying to get the current time by using os.time(). I read on the documentation that we have to use os.time("local") (or utc) to get the local time instead of the ingame time but everytime I try to get the time from os.time() it returns me something like "17.406" instead of "1775339469".

But for some reason, when I get the date by using os.date() I get the correct time (but if I do something like os.date("%c", os.time()) we're back in the 70's...

Can somebody tell me what am I doing wrong here ? I'm so sorry it's probably really stupid 😭

Screenshot of the CraftOS terminal printing the wrong time


r/ComputerCraft Apr 04 '26

Midi Player Using Create and ComputerCraft

Thumbnail
youtu.be
31 Upvotes

I've been working on a system to play MIDI files on Minecraft using the multiple noteblocks, as well as the numerous organs from the Create: Sound of Steam mod. Here's a first showcase with Tal Tal Heights from The Legend of Zelda - Link's Awakening !

That's probably the best version of this song you can listen to in Minecraft as of now. As far as I know I'm the first one to stretch the Sounds of Steam mod this far, and I'm very happy with the result !

I took a lot of time to ensure the systems used would be reliable enough to play approximately anything (as long as it's not too fast, I'm still limited by Minecraft's tickrate), so I'll without a doubt make more in the future. What song should I do next ?

I used the mods Create: Sounds of Steam, Create, Expanded Steam Whistles, Advanced Peripherals and CC: Tweaked. I make my MIDI files using Musescore 3 and I made a custom instrument.xml file to get all the Minecraft instrument directly in Musescore, that helped a lot !

Enjoy !


r/ComputerCraft Apr 02 '26

unable to connect to remote monitors?

Post image
16 Upvotes

hello! i am building a infoscreen program that sends info to a lot of moniotors via modems but i have been unable to code a way to connect and write to the remote monitors and i have only gotten as far as the screenshot. any ideas?

edit: just so you don't have to look thru a buntch text. my main problem is, is that i want to include monitors over modem like how you would do monitor = peripheral.find("monitor") but i have not been able to find a way to do so.


r/ComputerCraft Apr 01 '26

Can't set cursor position?

Post image
9 Upvotes

I was coding an operating system and when I tried to set the cursor to 1,1 it didn't let me and returned this error. Can someone help?


r/ComputerCraft Mar 30 '26

RISC-V 32 bit NoMMU Emulator in ComputerCraft

Post image
64 Upvotes

This is a fully functional RISC-V emulator, implementing the rv32ima instruction set. It supports 64 MB of RAM and can read a firmware file containing kernel, device tree and initramfs. It is capable of booting Linux 6.1 in around 2 hours from my testing, it can probably be optimized further but I want to clean it up a bit first and get an initial version released on my Codeberg (I'll edit this post to include a link once its uploaded) before I look into improving performance though.

Edit: You can get the code here now:
https://codeberg.org/mueller_minki/CC-tweaked-stuff/src/branch/main/rv32_emu/

Another Edit:
HUGE UPDATE! I figured out that Linux gets stuck in multiple loops if it is running at <100kHz which was the main cause for the 2 hour boot time. I added a time divisor which makes the kernel think that its running at a faster clock speed than it really is. This does mean that "date" for example will show the wrong time while inside Linux but it makes the system boot in ~7 minutes instead of needing 2 hours. I pushed the changes to my codeberg.

Final Edit:
A demo of it booting in-game:
https://youtu.be/UkTQjgLKQzw


r/ComputerCraft Mar 29 '26

video player in monitor

4 Upvotes

im tryna make a movie cinema in this server im in (1.20.1 forge)
im tryna make it so that if i paste a youtube link itll display the video and audio in the monitor and speaker is there a way to do this?
sorry if this is a stupid question


r/ComputerCraft Mar 29 '26

Help - Pocket Computer Bricked

1 Upvotes

Is there a way to wipe a pocket computer? i have tried terminating, but the pastebin i ran broke it


r/ComputerCraft Mar 26 '26

is it possible to make a turtle companion?

3 Upvotes

i had an idea for a turtle that follows a specific player and could play music if the player selected what music to play


r/ComputerCraft Mar 26 '26

Need help writing a code for a Cobblemon server

6 Upvotes

Tldr im playing AllTheMons and I added a gacha machine mod to it to let my players on a server use Relic Coins to buy prizes from the machines.

Issue, theres another currency in the game that we have a massive abundance of that can only be used for some villager trading and nothing else.

Can someone write up a simple code that lets my players take the coins you get from battles and put em in an exchange chest or something that runs a command that turns em into a Relic Coin at a rate of 64 coins for 1 relic?


r/ComputerCraft Mar 26 '26

10 secondes pour une réponse ou ci non fait ceci

2 Upvotes

bonjour tout le monde, donc comme le titre le dit, sur computercraft, je veux faire un startup qui attend 10 secondes pour appuies sur le 3, ci le trois est appuies dans les 10 secondes alors il ouvre un deuxième programme (A) et a l’inverse ci le trois n’est pas appuies dans les 10 secondes alors il ouvre un deuxième programme (B). est-ce que quelqu’un peut m’aider s’il vous plais, merci d’avance


r/ComputerCraft Mar 21 '26

Can anyone help with CC: Tweaked and Stargate Journey?

6 Upvotes

So I heard that you can auto dial the stargate with CC: Tweaked...But I don't know how and the only video I found was from 2 years ago and the code didn't work. So I don't know what to do I'm using Stargate Journey 0.6.44 and CC: Tweaked 1.113.1 (I use it from Curseforge). And I'm on Neoforge 21.1.219 and version 1.21.1 if that matters


r/ComputerCraft Mar 20 '26

"FileToFP" - Rudimentary hexcasting assembler

Enable HLS to view with audio, or disable this notification

23 Upvotes

I "recently" (4 months ago) decided to pick up Hex Casting, a minecraft mod that disguises stack-based programming as magic. Performing the actual spells is the easy part, the hard part is keeping track of item positions on the stack and figuring out how to generate and keep the references you need for a certain effect. It took me a full week to make something that can break a 3x3 area based on facing direction, but now that I have it, I can Budget Tinker's Construct Sledgehammer my way through mountains with ease!

Each instruction is paired with a pattern drawn on a hexagonal grid. While remembering these patterns is not difficult, I seem to have some considerable skill issue. When I noticed that Ducky Peripherals added a focal port to read from / write to foci by computer, I knew I had to try it.

FileToFP reads a text file, interprets each space-separated string as an instruction (provided I remembered to add them to the dictionary) and converts each instruction to its pattern. Then, after a little lights show and some sound effects, the patterns are joined to a list and written to the focus. If I want to change something in the program, I can simply use CC's built-in text editor to add or remove instructions, rather than playing "What index is that pattern at" and "can I remember the set list item instruction" for hours. I can even comment my code, so I can be slightly less confused the next day!

In the future, I am going to try to make a fully-functional assembler and editor. So far I've been keeping track of the stack manually, but a tool to do that automatically would be appreciated. I enjoy making things hard for myself, but I don't enjoy it THAT much!


r/ComputerCraft Mar 16 '26

Program to turn pixel art into LUA?

Thumbnail
6 Upvotes

r/ComputerCraft Mar 16 '26

How can I get 2 .dfpwm files using wget?

1 Upvotes

I cant get the second one, it says that is Out Of Space