Difference between revisions of "Minecraft Forge Handshake"
m (Pokechu22 moved page User:Pokechu22/Forge to Minecraft Forge Handshake: Moving to mainspace) |
(Add packet 2.) |
||
Line 6: | Line 6: | ||
HEADING = Work in progress! | | HEADING = Work in progress! | | ||
CONTENT = | CONTENT = | ||
− | This page is a work in progress, and may be missing | + | This page is a work in progress, and may be missing information. |
}} | }} | ||
− | + | Documentation of the [http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2520465 World Downloader mod]'s plugin channel configuration system. | |
− | + | See [https://github.com/Pokechu22/WorldDownloader/blob/master/src/wdl/WDLPluginChannels.java here]. | |
− | == | + | == Note == |
− | + | All types here are as specified by Java's [http://docs.oracle.com/javase/7/docs/api/java/io/DataOutputStream.html <code>DataOutputStream</code>] and can be read using a [http://docs.oracle.com/javase/7/docs/api/java/io/DataInputStream.html <code>DataInputStream</code>], unless otherwise noted. | |
− | < | + | == <code>WDL|INIT</code> == |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | ||
− | + | <code>WDL|INIT</code> is sent to show that World Downloader is ready to receive new permissions. Don't send permissions until this is received - it may still be saving from another part of the map or another sever where it has permission, and revoking permission in the middle is a Bad Thing™. | |
− | + | {| class="wikitable" | |
− | + | ! Bound To | |
− | + | ! Field Name | |
− | + | ! Field Type | |
− | + | ! Notes | |
− | + | |- | |
− | = | + | | rowspan="2" | Server |
− | + | | Mod version | |
− | + | | UTF8 string | |
− | + | | This is a byte array; the remainder of the packet is this value (there is no length specified). In some older versions of the mod, this is not present and the length of the packet is 0. | |
− | + | |} | |
− | |||
− | |||
− | |||
− | |||
− | + | == <code>WDL|CONTROL</code> == | |
− | + | This channel is sent from the server to the client to specify various permissions. It uses a 4-byte integer at the start to indicate a section. There is no required order, but it is conventional to put them in numerical order. | |
− | + | In all cases unless otherwise indicated, if a packet is not sent its values are treated as 'true'. | |
− | + | === Default values === | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Specifies the default value used for permissions not sent. | |
− | + | Note that sending this packet does not actually ''change'' the value for other packets; it instead specifies an internal fallback. Thus, this packet can be sent at any time to change this default without needing to resend other packets. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 120: | Line 52: | ||
! Notes | ! Notes | ||
|- | |- | ||
− | |rowspan=" | + | | rowspan="2" | <code>WDL|CONTROL</code> |
− | |rowspan=" | + | | rowspan="2" | Client |
| Discriminator | | Discriminator | ||
− | | | + | | Integer |
− | | | + | | Set to 0 to indicate this packet. |
|- | |- | ||
− | | | + | | Default value |
− | | | + | | Boolean |
− | | | + | | True to enable all functions not otherwise specified, false to disable them. |
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | === | + | === Basic data === |
− | + | Sets some of the standard properties. | |
{| class="wikitable" | {| class="wikitable" | ||
Line 146: | Line 74: | ||
! Notes | ! Notes | ||
|- | |- | ||
− | |rowspan=" | + | | rowspan="7" | <code>WDL|CONTROL</code> |
− | |rowspan=" | + | | rowspan="7" | Client |
| Discriminator | | Discriminator | ||
− | | | + | | Integer |
− | | | + | | Set to 1 to indicate this packet. |
|- | |- | ||
− | | | + | | General download enabled |
− | | | + | | Boolean |
− | | | + | | True to enable all downloading in all chunks, false to disable it. |
− | | | + | |- |
− | + | | Save radius | |
− | + | | Integer | |
− | + | | The distance from the player chunks can be saved from. -1 to allow all distances. This is a square distance, not a circle or a diamond. '''Only applies if chunk caching is disabled'''. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | Chunk caching enabled |
− | | | + | | Boolean |
− | | | + | | Can chunks be saved as the player moves about. If false, then they can only save within the area indicated by save radius; if true they can save everywhere. However, regardless of this value, if general download is disabled, they cannot download. |
− | |||
− | |||
|- | |- | ||
− | | | + | | Entity saving enabled |
− | | | + | | Boolean |
− | | | + | | True to allow the mod to save entities, false to force entities to be removed from the world. This only applies to chunks that can be saved. |
|- | |- | ||
− | | | + | | Tile entity saving enabled |
− | + | | Boolean | |
− | + | | True to allow the mod to save tile entities, false to force tile entities to be removed from the world. This only applies to chunks that can be saved. | |
− | | | ||
− | | | ||
|- | |- | ||
− | | | + | | Container saving enabled |
− | | | + | | Boolean |
− | | | + | | True to allow the mod to save containers (a subset of tile entities that require manual interaction to be saved, mainly chests). This only applies if tile entities are allowed to be saved and only applies in chunks that can be saved. |
|} | |} | ||
− | === | + | === Entity track distances === |
− | + | Used to specify any custom entity track distances on the server, because they may change on spigot servers. More info on why this is needed on [https://github.com/Pokechu22/WorldDownloader/wiki/Entities-GUI#what-are-track-distances the project wiki]. | |
− | The server | + | The client is free to ignore these values, and will use sane defaults based off of whether the server's brand includes "spigot" if they are not sent. However, by default these values are used. |
{| class="wikitable" | {| class="wikitable" | ||
! Channel | ! Channel | ||
! Bound To | ! Bound To | ||
− | !colspan="2"| Field Name | + | ! colspan="2" | Field Name |
− | !colspan="2"| Field Type | + | ! colspan="2" | Field Type |
! Notes | ! Notes | ||
|- | |- | ||
− | |rowspan=" | + | | rowspan="4" | <code>WDL|CONTROL</code> |
− | |rowspan=" | + | | rowspan="4" | Client |
− | |colspan="2"| Discriminator | + | | colspan="2" | Discriminator |
− | |colspan="2"| | + | | colspan="2" | Integer |
− | | | + | | Set to 2 to indicate this packet. |
|- | |- | ||
− | |colspan="2"| | + | | colspan="2" | Number of ranges |
− | |colspan="2"| | + | | colspan="2" | Integer |
− | | | + | | Size of the following array. |
|- | |- | ||
− | + | | rowspan="2" | Ranges | |
− | + | | Entity name | |
− | + | | rowspan="2" | Array | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |rowspan="2"| | ||
− | | | ||
− | |rowspan="2"| Array | ||
| String | | String | ||
− | | | + | | The name of the entity, as used in the savegame ID. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | Track distance |
− | | | + | | Integer |
− | | | + | | The track distance of the entity, in blocks. |
|} | |} | ||
− | == | + | == <code>WDL|REQUEST</code> == |
− | + | Used for permission requests. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 19:48, 25 January 2016
Work in progress!
|
Documentation of the World Downloader mod's plugin channel configuration system.
See here.
Contents
Note
All types here are as specified by Java's DataOutputStream
and can be read using a DataInputStream
, unless otherwise noted.
WDL|INIT
WDL|INIT
is sent to show that World Downloader is ready to receive new permissions. Don't send permissions until this is received - it may still be saving from another part of the map or another sever where it has permission, and revoking permission in the middle is a Bad Thing™.
Bound To | Field Name | Field Type | Notes |
---|---|---|---|
Server | Mod version | UTF8 string | This is a byte array; the remainder of the packet is this value (there is no length specified). In some older versions of the mod, this is not present and the length of the packet is 0. |
WDL|CONTROL
This channel is sent from the server to the client to specify various permissions. It uses a 4-byte integer at the start to indicate a section. There is no required order, but it is conventional to put them in numerical order.
In all cases unless otherwise indicated, if a packet is not sent its values are treated as 'true'.
Default values
Specifies the default value used for permissions not sent.
Note that sending this packet does not actually change the value for other packets; it instead specifies an internal fallback. Thus, this packet can be sent at any time to change this default without needing to resend other packets.
Channel | Bound To | Field Name | Field Type | Notes |
---|---|---|---|---|
WDL|CONTROL
|
Client | Discriminator | Integer | Set to 0 to indicate this packet. |
Default value | Boolean | True to enable all functions not otherwise specified, false to disable them. |
Basic data
Sets some of the standard properties.
Channel | Bound To | Field Name | Field Type | Notes |
---|---|---|---|---|
WDL|CONTROL
|
Client | Discriminator | Integer | Set to 1 to indicate this packet. |
General download enabled | Boolean | True to enable all downloading in all chunks, false to disable it. | ||
Save radius | Integer | The distance from the player chunks can be saved from. -1 to allow all distances. This is a square distance, not a circle or a diamond. Only applies if chunk caching is disabled. | ||
Chunk caching enabled | Boolean | Can chunks be saved as the player moves about. If false, then they can only save within the area indicated by save radius; if true they can save everywhere. However, regardless of this value, if general download is disabled, they cannot download. | ||
Entity saving enabled | Boolean | True to allow the mod to save entities, false to force entities to be removed from the world. This only applies to chunks that can be saved. | ||
Tile entity saving enabled | Boolean | True to allow the mod to save tile entities, false to force tile entities to be removed from the world. This only applies to chunks that can be saved. | ||
Container saving enabled | Boolean | True to allow the mod to save containers (a subset of tile entities that require manual interaction to be saved, mainly chests). This only applies if tile entities are allowed to be saved and only applies in chunks that can be saved. |
Entity track distances
Used to specify any custom entity track distances on the server, because they may change on spigot servers. More info on why this is needed on the project wiki.
The client is free to ignore these values, and will use sane defaults based off of whether the server's brand includes "spigot" if they are not sent. However, by default these values are used.
Channel | Bound To | Field Name | Field Type | Notes | ||
---|---|---|---|---|---|---|
WDL|CONTROL
|
Client | Discriminator | Integer | Set to 2 to indicate this packet. | ||
Number of ranges | Integer | Size of the following array. | ||||
Ranges | Entity name | Array | String | The name of the entity, as used in the savegame ID. | ||
Track distance | Integer | The track distance of the entity, in blocks. |
WDL|REQUEST
Used for permission requests.