Download OpenStuff — Minecraft Mods — MetaMods

OpenStuff

Active

Downloads

0

Last update

3 years ago
Client
Weapons and armor
Technological

OpenStuff - Armor for OpenComputers

The OpenStuff modification provides special armor that integrates with the OpenComputers system and is controlled similarly to nanomachines. This allows players to create advanced protective suits with extended control functions.

Creation and Capabilities

The armor is crafted in an assembler using diamond armor pieces. After creation, you gain access to a powerful API that opens up numerous possibilities for customization and management.

Functional Capabilities

Appearance Management

  • setColor(number:color) - sets the armor color (value from 0 to 15)
  • getColor() - returns the currently set color

Information Display

  • displayText(string:text,number:x,number:y,number:color) - displays text on the player's screen with specified coordinates and color (range 0x000000-0xFFFFFF)
  • notDisplayText(string:text,number:x,number:y) - removes the specified text from the given coordinates

Player Information

  • getDimensionIndex() - returns the ID of the dimension where the player is located
  • getPosition() - returns the player's xyz coordinates
  • getBedLocation() - returns the coordinates of the player's bed
  • hasBedLocation() - checks if the player has a bed
  • getDisplayName() - returns the player's name
  • getExperienceLevel() - shows the player's experience level
  • getFoodLevel() - displays the hunger level
  • getSaturationLevel() - shows the saturation level
  • getHealth() - returns the player's health level

Usage Examples

In the Lua shell, you can configure interaction with the armor:

event.listen("modem_message",print);
component.modem.open(1)
-- prints all messages received from the armor

component.modem.broadcast(1,"openarmor","setColor",15)
-- sets the armor color to white

To create your own armor control shell:

function toList(a)
    local b={}
    for c in string.gmatch(a,"[^%s]+") do
        if c=="true" then
            table.insert(b,true)
        elseif c=="false" then
            table.insert(b,false)
        elseif tonumber(c)~=nil then
            table.insert(b,tonumber(c))
        else
            table.insert(b,c)
        end
    end
    return table.unpack(b)
end

event.listen("modem_message",print)
component.modem.open(1)
while true do
    component.modem.broadcast(1,"openarmor",toList(io.read()))
end
-- converts Lua shell to armor control shell

This modification is perfect for players who want to expand OpenComputers capabilities and create a personalized protection system with advanced control features.

Project members
grahmindol_83

grahmindol_83

Grahmindol

Grahmindol

Created: 25 Aug 2022

ID: 54372