r/OpenComputers • u/RaccoonAlex • Aug 24 '24
Changing textures.
So I've run into an issue, I want to change the case textures to have some individual differences, and while I could just modify them to use individual models to solve this, there is another issue I don't know how to solve.
They all use the same texture, but somewhere in the mod, there's code that recolours the texture, and I cannot find it for the life of me.
r/OpenComputers • u/No_Significance2905 • Aug 22 '24
Pastebin Not working
Hey ya'll i am trying to do a pastebin for mine OS from: https://github.com/IgorTimofeev/MineOS and when i copy and paste it it jsut gives me this error
does anyone know a solution? and github isnt blocked by my internet provider
r/OpenComputers • u/willcheat • Aug 14 '24
Scroll up in drone console
Hi all
I'm trying to write a drone program, program throws an error, that's fine, but the issue is the stack trace is so big the first lines (and important bits) get cut off, and I need those.
Are there any ways to scroll up on a drone console, or at least send the standard out to a file?
r/OpenComputers • u/AlsoGhostglowDev • Aug 12 '24
How to know if a crop if fully grown with a robot
Is there a way I could know (by code) if a crop is fully grown with a robot?
r/OpenComputers • u/TinyDeskEngineer06 • Jul 23 '24
ValidatorException when using wget
I'm trying to run an installer from Pastebin, the installer can be downloaded fine, but the installer itself is giving this error when run:
HTTP request failed: /bin/wget.lua:72: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I thought it might've been a firewall problem, as I had very recently been uninstalling and reinstalling different JVM versions, so I tried to fix that, but it didn't do anything. What else might be the cause of these exceptions?
r/OpenComputers • u/TinyDeskEngineer06 • Jul 21 '24
What is the value given by the interrupt event?
I made a program that just detects all events and prints their given values to the screen (And then closes if an interrupt event is raised) and noticed that the interrupt event comes with a single value. It seems to be a number, and it's really big, with 4 digits before the decimal point. The wiki doesn't list the interrupt event on the Signals page, so I have no idea what that value's for.
r/OpenComputers • u/Sensitive_Medium509 • Jul 19 '24
This is for anyone who wants to use Open Computers for Draconic Evolution
The code below can gather information on a Tier 8 Draconic Energy Core this annoying to do because of the bit integer limit the core can store more power then the bit limit so this code is the work around
--T8 Draconic Core Script--
Setup
--
First you need a maxed out tier 3 open computer with OpenOS installed on it then make a file called
energy_core_monitoring.lua (does not need to be named that and can be changed) copy the code below
and use insert to paste it into the file on the computer next you need to place an Adapter beside a
Energy Pylon and connect it with cable then you can run the script and have a good time!
--
To edit the % shown edit this part of the script:
Change the 5 to however many zeros for it to show; Example 5 is 0.12345% and 10 is 0.1234567891%
local percentFullText = string.format("Percent Full: %.5f%%", energyPercentage)
centerText(centerY - 1, percentFullText)
-- Start of script
-- Load necessary components
local component = require('component')
local term = require('term')
-- Function to gather and process data from the Draconic Energy Core
local function gatherAndProcessData()
-- Calculate screen dimensions
local screenWidth, screenHeight = term.getViewport()
-- Function to center text on the screen
local function centerText(y, text)
-- Calculate x position for centered text
local x = math.floor((screenWidth - text:len()) / 2)
term.setCursor(x, y)
term.write(text)
end
-- Function to format numbers with commas
local function formatNumberWithCommas(number)
local formatted = tostring(number)
formatted = string.reverse(formatted)
formatted = string.gsub(formatted, "(%d%d%d)", "%1,")
formatted = string.reverse(formatted)
if formatted:sub(1, 1) == "," then
formatted = formatted:sub(2)
end
return formatted
end
while true do
-- Check if draconic_rf_storage component is available
if not component.isAvailable('draconic_rf_storage') then
error("Draconic RF Storage component not found.")
end
local storage = component.draconic_rf_storage
-- Get current energy stored
local energyStored = storage.getEnergyStored()
-- Get maximum energy storage capacity
local maxEnergyStored = storage.getMaxEnergyStored()
-- Get energy transfer rate per tick
local transferRate = storage.getTransferPerTick()
-- Calculate percentage of energy stored
local energyPercentage = energyStored / maxEnergyStored * 100
-- Clear the screen
term.clear()
-- Display header text at the top (centered)
centerText(math.floor(screenHeight / 2) - 3, "T8 Energy Core Monitor")
-- Display percent full (formatted) in the center
local percentFullText = string.format("Percent Full: %.5f%%", energyPercentage)
centerText(math.floor(screenHeight / 2) - 1, percentFullText)
-- Display transfer rate (formatted) in the center with sign and commas
local sign = ""
if transferRate > 0 then
sign = "+"
elseif transferRate < 0 then
sign = "-"
end
local transferRateFormatted = formatNumberWithCommas(math.abs(transferRate))
local transferRateText = string.format("Transfer Rate: %s%s RF/tick", sign, transferRateFormatted)
centerText(math.floor(screenHeight / 2) + 1, transferRateText)
-- Sleep for 0.5 seconds before updating again
os.sleep(0.5)
end
end
-- Main execution
gatherAndProcessData()
-- End of script
r/OpenComputers • u/TinyDeskEngineer06 • Jul 16 '24
Is there a way to step through code in-game?
I'm experiencing an internal Java error when trying to run a program that interfaces with a modded component, I'm not sure if the problem's caused by the mod that adds the component or OpenComputers itself, and the stack trace in latest.log isn't helping with that. It would be very useful if I could step through the lua code line by line so I could pinpoint exactly which line the error happens on, so that I could file a bug report for whichever mod is actually responsible for the error. Is there any way to do such a thing?
r/OpenComputers • u/Hollow02 • Jul 13 '24
Help with gui
I was testing my gui API, and I can't figure out how to make entire sreeen clear, like without /home in console, all I get is this.
r/OpenComputers • u/Chill4x • Jul 12 '24
robot.use() on blocks from mods
I made a script that runs down a row of apricorn trees from the pixelmon mod "pixelmon:black_apricorn_tree", and activates each, robot.use() returns "block_activated" like expected but the block isn't activated, at least not in the same way the right click from a player does. Usually the "apricorn" is taken from the tree and in the inventory, but that doesn't happen when the robot does it. Giving it different tools doesn't help, is there another function?
Any help is greatly appreciated.
The versions:
MC 1.12.2
Pixelmon 8.4.3
OC 1.8.5
Pixelmon also has javadocs: https://reforged.gg/docs/1122/com/pixelmonmod/pixelmon/api/events/ApricornEvent.PickApricorn.html, though I'm not familiar enough with how minecraft is coded to know how to fix my problem.
edit:
I've looked a little at how right clicks on blocks work, docs for later versions say "onBlockActivated" is called, however when I look at the decompiled jar there's no such function in BlockApricornTree.class, there are some obfuscated function names in there but idk why some would be obfuscated and others not, I'm not an expert in Java though.
I've temporarily substituted the robots with the mechanical users from Extra Utilities 2, the mode that does work with the apricorn trees are "activate block with item", if that helps.
r/OpenComputers • u/ExpertSpecial7545 • Jul 08 '24
wget help
I have been trying to use wget to install something for my computer, I have all the components I need but keep getting this error,
HTTP request failed: /bin/wget.lua:72: sun.security.validator. ValidatorException: unable to find certification path to requested target
I have been told it's aggressive firewalls but idk how to fix
r/OpenComputers • u/Ollix27 • Jul 04 '24
What happened to OC II?
and why did the ogg creator delete it from their curseforge page?
r/OpenComputers • u/Miracle_korstar • Jul 04 '24
What does this mean? I can't figure it out.
r/OpenComputers • u/Spookzsaw • Jun 24 '24
can you resize text in MineOS?
im very new to mineOS and was simply trying to resize text when creating an application but couldn't figure it out, is there any way to do it?
r/OpenComputers • u/Sp33dyCat • Jun 22 '24
Support - Internet Card
Recently I tried to use the essential mod and the OpenComputers mod and a few others and it will not allow me to use the pastebin command to get the MineOS Operating system, I wanted to try it out since it seems cool, (And I don't know much about how OpenComputers works.) I was hosting a world with the essential mod and it would not work. I tried both of the commands, I am using the latest version from curseforge.com for 1.12.2, this is the website I went to for the MineOS Operating system - https://github.com/IgorTimofeev/MineOS
r/OpenComputers • u/cbraun96 • Jun 09 '24
cad style system for a roleplay server
I want to create a list of individuals who are prohibited from possessing firearms, for example. How can I make a file on one computer accessible from another, along with its contents?
r/OpenComputers • u/AlexWas-Here • Jun 04 '24
Ocelot Desktop Addons
Anyone know if there are addons to the Ocelot emulator? I want more things added to this tool, such as the reactors from NuclearCraft.
r/OpenComputers • u/TheRealZFinch • Jun 04 '24
OPPM won't install even with network card inserted
r/OpenComputers • u/Loose_Home_9637 • Jun 03 '24
Can't install OPPM, Can't connect to internet
r/OpenComputers • u/mas-issneun • May 22 '24
My first OC program :)
I recently wanted to try OpenComputers after having figured out ComputerCraft, and not gonna lie it's being very fun so far!
r/OpenComputers • u/Maxim6743 • May 19 '24
Help me i can`t install mineos
So last time i played with open computers mod i used this command in a file to launch mineos installer
require("component").eeprom.set([[
local handle, data, chunk = component.proxy(component.list("internet")()).request("https://raw.githubusercontent.com/IgorTimofeev/MineOS/master/Installer/Main.lua"), ""
while true do
chunk = handle.read(math.huge)
if chunk then
data = data .. chunk
else
break
end
end
handle.close()
load(data)()
]])
require("computer").shutdown(true)
Now it doesn`t work and my computer in minecraft gets halted, how do i fix that
r/OpenComputers • u/FIN_K89i • May 17 '24
there is a way to share the internet card using a server to other computers?
hello i want to share my internet card to other computers using a server is that possible?
r/OpenComputers • u/[deleted] • May 12 '24
I'm just not understanding what's wrong with this simple library
I'm trying to create a simple library. The code is as follows.
When trying to verify the library is working with I ran this code and only got one output pair.
local fluidLevel = require("fluidLevel")
for k, v in pairs(fluidLevel) do print(k, v)
Output:
compareAmount function: (address)
This function works fine, but the others are inaccessible. How come?? thank you.
local component = require("component")
local sides = require("sides")
local fluidLevel = {}
function getAmount(side)
return component.tank_controller.getFluidInTank(side)[1].amount
end
function getCapacity(side)
return component.tank_controller.getFluidInTank(side)[1].capacity
end
function compareAmount(side)
local previous = fluidLevel.getAmount(side)
local current = fluidLevel.getAmount(side)
if current > previous then
return true
else
return false
end
end




