Skip to content
Harley O'Connor edited this page Jan 22, 2023 · 20 revisions

Header

This mod adds ComputerCraft peripherals that provide powerful creation and management features for Minecraft server admins. None of the items in this mod are craft-able and are meant to be acquired in creative mode. A datapack can be used to create recipes of items if the server admin desires.

Please note that this wiki is relevant for Minecraft 1.16.5.

Peripherals

Cartographer

Cartographer

The Cartographer peripheral is used to manipulate maps. This can be used to create custom maps and images.

Functions

  • getMapPixel <mapNum>, <x>, <z> Gets the color index of the pixel at the given coordinates on the given map. Maps are 128x128 pixels so x and z should be in the range [0,128).
  • setMapPixel <mapNum>, <x>, <z>, <colorIndex> Sets the color index at the given coordinates on the given map. Note that the setMapLocked function will need to be used if you want to save this modification.
  • getMapPixels <mapNum> Returns a byte array containing all the color indexes of the map. This is a flat array with each row placed one after the other; this means that if you wanted to get the pixel at a particular coordinate, the index would be calculated by x + z * 128.
  • setMapPixels <mapNum>, <array>
  • getMapCenter <mapNum>
  • setMapCenter <mapNum>, <x>, <z>
  • getMapScale <mapNum>
  • setMapScale <mapNum>, <scale>
  • getMapLocked <mapNum>
  • setMapLocked <mapNum>, <locked> Allows toggling whether or not the map is locked. Locking the map will stop it refreshing automatically.
  • getMapDimension <mapNum>
  • setMapDimension <mapNum>, <dimension>
  • copyMapData <mapA>, <mapB>
  • swapMapData <mapA>, <mapB>
  • updateMap <mapNum> Marks the map as dirty and sends update packets to all clients.
  • getBlockMapColor <x>, <y>, <z> Returns the map color of the block at the given coordinates.
  • getRGBfromMapColor <index> Returns the RGB representation of the given color index in an integer array.

mapNum parameters should contain the numerical map ID for the map to operate on. This can be found on the tooltip of any filled map. If the map ID given to any of the above functions does not have an associated map, a new one will be created centered on 0, 0.

Remote Receiver

Receiver

The Remove Receiver peripheral is used to listen to the remote control's signals in the world making it possible for blocks in the world to be point and clickable. It also listens for touch events on touch buttons and map guards. Together with the cartographer this can be a useful means to make interface displays from wall maps.

This will also listen for claim block placement, command potion, command splash potion, and command ring events.

Functions

  • connect Allows events broadcast to this computer to be received using os.pullEvent.
  • disconnect Stops events being broadcast to this computer.
  • setBounds <minX>, <minY>, <minZ>, <maxX>, <maxY>, <maxZ> Sets the bounds for which the receiver should listen for events in.
  • clearBounds
  • touchButton <x>, <y>, <z> Activates a touch button at the given coordinates.

Events

  • remote_control <playerName>, <remoteId>, <hitPosMap>, <blockPosMap>, <faceNum>
  • touch_map <playerName>, <heldItemName>, <hitPosMap>, <blockPosMap>, <faceNum> Activated when a map guard is right clicked.
  • prox <playerName>, <blockPosMap>, <command> Activated on execution of the /prox [args] command. The args are passed to the command argument as an array of strings.
  • potion <playerName>, <blockPosMap>, <payload> Activated when a command potion is used by a player.
  • splash <playerName>, <blockPosMap>, <payload> Activated on impact of a command splash potion. The playerName argument is the name of the thrower of the potion.
  • ring <playerName>, <blockPosMap>, <payload>
  • claim <playerName>, <blockPosMap>, <set> Activated when a claim is placed or broken.
  • chat <playerName>, <blockPosMap>, <msg> Activated when a player posts a message to the server chat.

Sentinel

Sentinel

The Sentinel peripheral is used to have greater control over sensitive areas. Nullify player block breaking and placing, explosions, mob spawns, and endermen teleports. Bounds are created as cuboid shapes, cylindrical shapes or boundless(anywhere).

Functions

  • addCuboidBounds <boundsName>, <boundsType>, <minX>, <minY>, <minZ>, <maxX>, <maxY>, <maxZ>
  • addCylinderBounds <boundsName>, <boundsType>, <posX>, <posZ>, <minY>, <maxY>, <radius>
  • addAnyBounds <boundsName>, <boundsType>
  • remBounds <boundsName>
  • listBounds
  • addEntityFilter <boundsName>, <filterName>, <filterType>, <filterData>
  • remEntityFilter <boundsName>, <filterName>
  • getBoundsData <boundsName>
  • getEntitiesInBounds <boundsName>
  • getPlayersInBounds <boundsName>
  • rayTrace <x1>, <y1>, <z1>, <x2>, <y2>, <z2>, <checkEntities>
  • rayTraceBatch <segmentArray>, <checkEntities>
Bounds types:
  • break
  • place
  • blast
  • spawn
  • ender
  • ident
Filter types:
  • hostile
  • peaceful
  • entity
  • all
  • none

Terraformer

Terraformer

The Terraformer peripheral is used to manipulate world biome data. This can be used to change the biomes in the world.

Functions

  • getBiome <xCoord>, <zCoord>
  • getBiome3D <xCoord>, <yCoord>, <zCoord>
  • setBiome <xStart>, <zStart>, <xStop>, <zStop>, <biomeName>*
  • setBiome3D <xStart> <yStart> <zStart> <xEnd> <yEnd> <zEnd> <biomeName>*
  • getBiomeArray <xPos> <zPos> <xLen> <zLen> <scale>
  • setBiomeByteMapping <mapping>
  • getBiomeByteArray <xPos>, <zPos>, <xLen>, <zLen>, <scale>
  • getBiomeNames
  • getYTop <xCoord>, <zCoord>, <solid>
  • getYTopArray <xPos>, <zPos>, <xLen>, <zLen>, <scale>, <solid>
  • getTemperature <xCoord>, <yCoord>, <zCoord>

* Due to the way biomes work in 1.16+, note this command does not work perfectly. It is designed to ensure every block in the given range is changed to the given biome, but there will be some overlap into nearby blocks.

Web Modem

Web Modem

The Web Modem is used to turn your computercraft computer into a web server that can be accessed from the real world. This is useful for driving events on a Minecraft server from a web interface, getting information from the Minecraft server on the web, or establishing a datalink between 2 or more Minecraft servers. This peripheral was adapted from a mod written by qidydl as part of his unreleased experimental ComputerCraft-Webserver mod for 1.6.4.

Functions

  • sendReply <connId>, <respCode>, <respData>

Events

  • HEAD_request <sockHashCode>, <path>, <args>, <path>, <params>, <headers>, <data>
  • GET_request <sockHashCode>, <path>, <args>, <path>, <params>, <headers>, <data>
  • POST_request <sockHashCode>, <path>, <args>, <path>, <params>, <headers>, <data>
  • PUT_request <sockHashCode>, <path>, <args>, <path>, <params>, <headers>, <data>
  • PATCH_request <sockHashCode>, <path>, <args>, <path>, <params>, <headers>, <data>
  • DELETE_request <sockHashCode>, <path>, <args>, <path>, <params>, <headers>, <data>

All method events contain the following parameters:

  1. socketHashCode The code as a number used to respond to the request with the sendReply function
  2. path The url path as a string
  3. params Query parameters as key/value string pairs
  4. headers Headers as key/value string pairs
  5. data The payload body typically from a POST, PUT, or PATCH request (put your JSON here)

Items

Remote Control

Remote

Use of this item causes a remote_control event to be generated in any connected Remote Receivers. A raytrace is done from the player to whatever block was clicked on and a precise hitpoint is relayed to the server. The event conveys the player's identity, the position of the block clicked on, the point on the block that was hit and the id of the remote. Remotes can be configured with custom ids for specific applications. The orb on the icon of the remote can be customized to any color per remote for easy identification.

Map Guard

Map Guard

The map guard is used to place an invisible shield block over an item frame to prevent the contained item or map from being broken, spun, or removed. This guard is touch sensitive and will generate touch_map events that can be picked up by the Remote Receiver. The map guard also comes in a lighted version so a map can be uniformly lit in a dark room.

Light

Light

Freely place-able invisible source light blocks like those provided in the 1.17+ versions of Minecraft. Available from 1-15 light levels for lighting up those dark areas in a much more efficient and subtle manner. Behaves as air and can be blocked over to eliminate it.

Command Potion

Command Potion

A potion that has an embedded custom string used in the Remote Receiver event. Consuming the potion will trigger the potion event in listening remote receivers with the string as payload. The color and name of the potion can also be customized. Can be useful for such things as teleport potions, mob spawns, or basically any kind of custom behavior that is scriptable in CC.

There is also a splash potion version of this that works in the same way, sending a splash event to remote receivers.

Usage
Create a "Dawn Potion":

/give @p mcf:command_potion{label:"Dawn Potion",command:"/time set 0",color:"#FFFF20",info:"Sets time to morning"}

Create a proxy command potion:

/give @p mcf:command_potion{label:"Test Potion",command:"test 12345",color:"#44FF60",info:"Sends a test command"}

Command Rings

Command Ring

A ring that has an embedded custom string used in the Remote Receiver event. Moving with the ring will trigger an event in listening remote receivers with the string as payload. The jewel color and name of the ring can also be customized. Can be useful for such things as freezing water to ice underfoot, clearing away unwanted features with just the bearers presence, or basically any kind of custom behavior that is scriptable in CC.

Usage
Create a command block ring that fires an event to the Remote Receiver when the bearer moves to a new block:

/give @p mcf:command_block_ring{label:"Test Block Ring",command:"test",color:"#FFFF20",info:"Performs a test for block rings"}

Create a command chunk ring that fires an event to the Remote Receiver when the bearer moves to a new chunk:

/give @p mcf:command_chunk_ring{label:"Test Chunk Ring",command:"test",color:"#FF2020",info:"Performs a test for chunk rings"}

Entities

Item Display Entity

This entity can be summoned from the commandline to display items anywhere in free space. Very useful for decorating. These items can't be interacted with directly.

Usage
Summon a diamond at provided coordinates:

/summon mcf:item_display 5.25 68.5 -3.75 {CustomName:"gem_a",item:{id:"minecraft:diamond",Count:1b},scale:0.375f,rotation:[0f, 0f, 0f]}

Summon a small minecraft head with an apple texture (command may need to be placed in a command block since it's so long):

/summon mcf:item_display -19 75 36 { CustomName:"apple", scale:0.1875f, item: { id:player_head, Count:1b, tag: {SkullOwner:{Id:[I;1480778329,316624888,-1611935903,1148907210],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzVlMmUwOTU5NzEyZGNkMzM1N2NjM2NlYTg1Zjk5YjNmZDgwOTc4NTVjNzU0YjliMTcxZjk2MzUxNDIyNWQifX19"}]} }} } }

Click here to see more heads.