This component is provided by the Debug Card.
Component name: debug
.
The Debug Card, which is only available in creative mode, provides a set of fairly dangerous functionality for use in setting things up to debug and test code. Do not use the Debug Card without backups. No, really. One time I accidentally converted a vertical slice of the world entirely to Sign objects with no writing on them.
The debug card's “container” refers to the robot, computer or tablet with a debug card installed in it.
On a dedicated server the debug card must be bound to a player by shift-right-clicking with it to run commands using the runCommand callback. The bound player needs to have permission to use the command provided to runCommand.
Callbacks:
changeBuffer(value:number):number
connectToBlock(x:number, y:number, z:number):boolean
getPlayer(name:string):userdata
getPlayers():table
getWorld([id:number]):userdata
getWorlds():table
getX():number
getY():number
getZ():number
isModLoaded(name:string):boolean
runCommand(command:string):number, string
test():userdata
getScoreboard():userdata
sendToDebugCard(address:string, data...)
sendToClipboard(player:string, text:string)
scanContentsAt(x: number, y: number, z: number[, worldId: number]):boolean, string, table
local debug = require("component").debug local serialize = require("serialization").serialize local x, y, z = debug.getX, debug.getY, debug.getZ local offset_x = -1 local offset_z = 0 local blocking, label, content = debug.scanContentsAt(x() - .5 + offset_x, y() - .5, z() - .5 + offset_z) print(blocking, label, serialize(content))
The world object reflects the current world (dimension) the container is in.
getMetadata(x:number, y:number, z:number):number
getBlockId(x:number, y:number, z:number):number
getDimensionId():number
isLoaded(x:number, y:number, z:number):number
getSeed():number
removeFluid(amount:number, x:number, y:number, z:number, side:number):boolean
insertFluid(id:string, amount:number, x:number, y:number, z:number, side:number):boolean
getDimensionName():string
getTime():number
setTime(value:number)
getLightValue(x:number, y:number, z:number):number
isRaining():boolean
setRaining(value:boolean)
isThundering():boolean
setThundering(value:boolean)
setBlock(x:number, y:number, z:number, id:number or string, meta:number):number
setBlocks(x1:number, y1:number, z1:number, x2:number, y2:number, z2:number, id:number or string, meta:number):number
removeItem(x:number, y:number, z:number, slot:number[, count:number]):number
insertItem(id:string, count:number, damage:number, nbt:string, x:number, y:number, z:number, side:number):boolean
getSpawnPoint():number, number, number
setSpawnPoint(x:number, y:number, z:number)
canSeeSky(x:number, y:number, z:number):number
getLightOpacity(x:number, y:number, z:number):number
hasTileEntity(x:number, y:number, z:number):number
playSoundAt(x:number, y:number, z:number, sound:string, range:number)
getTileNBT(x:number, y:number, z:number):table
setTileNBT(x:number, y:number, z:number, nbt:table):boolean
getBlockState(x:number, y:number, z:number[, actualState:boolean=false])
A player object represents a given player in the world.
getWorld():userdata
getGameType():string
setGameType(gametype:string)
getHealth():number
setHealth(health:number)
getMaxHealth():number
getPosition():number, number, number
setPosition(x:number, y:number, z:number)
getExperienceTotal():number
getLevel():number
addExperienceLevel(level:number)
removeExperienceLevel(level:number)
insertItem(id:string, amount:number, meta:number[, nbt:string]):number
clearInventory()
addObjective(objectiveName:string, objectiveCriteria:string)
removeObjective(objectiveName:string)
increasePlayerScore(playerName:string, objectiveName:string, score:int)
decreasePlayerScore(playerName:string, objectiveName:string, score:int)
addPlayerToTeam(player:string, team:string):boolean
removePlayerFromTeam(player:string, team:string):boolean
removePlayerFromTeams(player:string):boolean
addTeam(team:string)
removeTeam(teamName: string)
getPlayerScore(playerName:string, objectiveName:string):int
setPlayerScore(playerName:string, objectiveName:string, score:int)
Components | 3D Printer - Abstract Bus - Access Point - Chunkloader - Computer - Crafting - Data Card - Database - Debug - Drone - Drive - EEPROM - Experience - Filesystem - Generator - Geolyzer - GPU - Hologram - Internet - Inventory Controller - Leash - Microcontroller - Modem - Motion Sensor - Navigation - Net Splitter - Piston - Redstone - Redstone in Motion - Robot - Screen - Sign - Tank Controller - Tractor Beam - Transposer - Tunnel - World Sensor | |
---|---|---|
Others | Component Access - Signals | |
Cross-Mod Integration | Applied Energistics |