Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
-- Configuration local threshold = 0.20 -- 20% while true do local cable = peripheral.wrap("top") if cable then local fill = cable.getFilledPercentage() if fill then print("Cable: " .. (fill * 100) .. "% full") if fill > threshold then redstone.setOutput("bottom", true) else redstone.setOutput("bottom", false) end else print("Erreur : périphérique sans getFilledPercentage()") end else print("Aucun périphérique détecté en haut") end sleep(1) -- évite de spam la boucle end
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)