The District of Joban Difference between revisions of "JCM:Packets"

Difference between revisions of "JCM:Packets"

From The District of Joban
Line 291: Line 291:


=== Server Receive ===
=== Server Receive ===
WIP
'''jsblock:packet_rv_pids_update'''
 
# Read the 2 position of the RV PIDS
# Read The max arrival
# Read Custom Messages and Hide Arrival Row
# Read whether platform circle is hidden
# Read PIDS Preset ID
# Set the above data to the 1st position of the RV PIDS (Left)
# Set the above data to the 2nd position of the RV PIDS (Right)
 
'''jsblock:packet_joban_pids_update'''
 
# Read the 2 position of the PIDS
# Read The max arrival
# Read Custom Messages and Hide Arrival Row
# Read PIDS Preset ID
# Set the above data to the 1st position of the PIDS (Left)
# Set the above data to the 2nd position of the PIDS (Right)

Revision as of 01:12, 27 August 2022

Client Side

Client Send

jsblock:packet_rv_pids_update (Send RV PIDS Configuration to Server)
Type Description
BlockPos Position of the left side of the RV PIDS
BlockPos Position of the right side of the RV PIDS
Integer The amount of custom messages to read (Always 4 for now)
String 1st row: The string of the custom message
Boolean 1st row: Whether the arrival is hidden
String 2nd row: The string of the custom message
Boolean 2nd row: Whether the arrival is hidden
String 3rd row: The string of the custom message
Boolean 3rd row: Whether the arrival is hidden
String 4th row: The string of the custom message
Boolean 4th row: Whether the arrival is hidden
Boolean Whether Platform Circle is hidden or not
String Name of the PIDS Preset
jsblock:packet_joban_pids_update (Send Joban PIDS Configuration to Server)
Type Description
BlockPos Position of the left side of the PIDS
BlockPos Position of the right side of the PIDS
Integer The amount of custom messages to read (Always 4 for now)
String 1st row: The string of the custom message
Boolean 1st row: Whether the arrival is hidden
String 2nd row: The string of the custom message
Boolean 2nd row: Whether the arrival is hidden
String 3rd row: The string of the custom message
Boolean 3rd row: Whether the arrival is hidden
String 4th row: The string of the custom message
Boolean 4th row: Whether the arrival is hidden
String Name of the PIDS Preset
jsblock:packet_subsidy_machine_update (Send Subsidy Machine Configuration to Server)
Type Description
BlockPos Position of the Subsidy Machine Block being modified
Integer Amount of balance it gives per click
Integer The timeout (In seconds)
jsblock:packet_faresaver_update (Send Fare Saver Configuration to Server)
Type Description
BlockPos Position of the Fare Saver Block being modified
Integer Amount of balance it saves
jsblock:packet_update_sound_looper (Send Sound Looper Configuration to Server)
Type Description
BlockPos Position of the Sound Looper Block being modified
BlockPos 1st set of positions for the limited range
BlockPos 2nd set of positions for the limited range
String Sound ID
Integer Sound Category Index

0: MASTER

1: MUSIC

2: WEATHER

3: AMBIENT

4: PLAYERS

Integer Loop Interval, in ticks
Float Volume, default is 1.0
Boolean Whether sound looper needs redstone
Boolean Whether range is limited

Client Receive

jsblock:packet_version_check

WIP

jsblock:packet_open_sound_looper_screen

  1. Read position of the sound looper
  2. If the current Minecraft Client has a world loaded:
    1. Get the BlockEntity of the sound looper
    2. If BlockEntity is in fact a sound looper:
      1. Open the Sound Looper Config GUI if it isn't opened already

jsblock:packet_open_rv_pids_config_screen

  1. If the current Minecraft Client has a world loaded:
    1. Read the position of the left and right side of RV PIDS
    2. Read the max arrival of the PIDS
    3. Read whether platform number circle is hidden
    4. Read PIDS Preset ID
    5. If BlockEntity is an RV PIDS:
      1. Open the RV PIDS Config GUI if it isn't opened already

jsblock:packet_open_joban_pids_config_screen

  1. If the current Minecraft Client has a world loaded:
    1. Read the position of the left and right side of PIDS
    2. Read the max arrival of the PIDS
    3. Read PIDS Preset ID
    4. If BlockEntity is a Joban PIDS:
      1. Open the Joban PIDS Config GUI if it isn't opened already

jsblock:packet_open_faresaver_config_screen

  1. If the current Minecraft Client has a world loaded:
    1. Read the position of the Fare Saver Block
    2. Read the discount value
    3. If BlockEntity is Fare Saver:
      1. Open a Fare Saver Config GUI if it isn't opened already

jsblock:packet_open_subsidy_config_screen

  1. If the current Minecraft Client has a world loaded:
    1. Read the position of the Subsidy Machine Block
    2. Read the "balance per click"
    3. Read the timeout
    4. If BlockEntity is Subsidy Machine:
      1. Open a Subsidy Machine Config GUI if it isn't opened already

Server Side

Server Send

jsblock:packet_open_sound_looper_screen
Type Description
BlockPos Position of the Sound Looper Block being right clicked
jsblock:packet_open_rv_pids_config_screen
Type Description
BlockPos Position of the left side of the RV PIDS
BlockPos Position of the right side of the RV PIDS
Integer The amount of custom messages for RV PIDS (Always 4 for now)
Boolean Whether Platform Number is hidden in this PIDS
String Preset ID of the PIDS
jsblock:packet_open_joban_pids_config_screen
Type Description
BlockPos Position of the left side of the PIDS
BlockPos Position of the right side of the PIDS
Integer The amount of custom messages for RV PIDS (Always 4 for now)
String Preset ID of the PIDS
jsblock:packet_open_subsidy_config_screen
Type Description
BlockPos Position of the Subsidy Machine Block right clicked
Integer Balance to add per click
Integer Timeout (In seconds)
jsblock:packet_open_faresaver_config_screen
Type Description
BlockPos Position of the Fare Saver Block right clicked
Integer The balance it discounts
jsblock:packet_open_sound_looper_screen
Type Description
BlockPos Position of the Sound Looper Block right clicked

Server Receive

jsblock:packet_rv_pids_update

  1. Read the 2 position of the RV PIDS
  2. Read The max arrival
  3. Read Custom Messages and Hide Arrival Row
  4. Read whether platform circle is hidden
  5. Read PIDS Preset ID
  6. Set the above data to the 1st position of the RV PIDS (Left)
  7. Set the above data to the 2nd position of the RV PIDS (Right)

jsblock:packet_joban_pids_update

  1. Read the 2 position of the PIDS
  2. Read The max arrival
  3. Read Custom Messages and Hide Arrival Row
  4. Read PIDS Preset ID
  5. Set the above data to the 1st position of the PIDS (Left)
  6. Set the above data to the 2nd position of the PIDS (Right)