your current location:首页 > news>Web stone minecraft

Web stone minecraft

2024-12-12 09:22:01|Myriagame |source:minecraft skins

Overview

This module is inspired by a YouTube video, adding a redstone component called "WebStone Remote Block" that can be controlled by the browser as the function in the video.

use

The module opens an WebSocket server on the port 4321. You can set the output signal of the registered WebStone Remote Block in the archive by setting up a webSocket client (you can use the author's custody client, or a example here).Control the intensity. You can right -click a place where the existing Webstone Remote Block can be registered in the game. The right -click can be closed.

API

The registered WebStone Remote Block will broadcast the following information to all connected WebSocket server, including the UUID, name, output status, and signal strength of the block:

 {"type": "block_list", "data": [{"block": "00000000-0000-00000000000000", "name": "exmple","Power": 15, "PowerEd": FALSE}]} 

When the output signal state of the block changes, the square will send the following information to the server:

 {"type": "block_state", "data": {"blockid": "00000000-0000-00000000000000", "PowerEd": false // true or orFALSE}} 

When the intensity of the output signal of the block changes, the square will send the following information to the server:

 {"type": "block_power", "data": {"blockid": "00000000-0000-00000000000000", "Power": 7 // from 0 from 0To 15 of 15}} 
The client can send the following information to set the output state of the block:

 {"type": "block_state", "data": {"block": "00000000-0000-000000000000", "PowerEd": false // can be fortrue or false}} 

The client can send the following information to set the output strength of the block:

 {"type": "block_power", "data": {"block": "00000000-0000-00000000000000", "Power": 7 //Any value from 0 to 15}} 

The client can send the following information to set the name of the block:

 {"type": "rename_block", "data": {"blockid": "00000000-0000-0000000000000000", "name": "My Examph"}} 
The client can send the following information to delete a registered block:

 {"type": "unregister_block", "data": {"blockid": "00000000-0000-00000000000000"}