Skip to content
Adrian K edited this page May 6, 2026 · 77 revisions

Welcome to the Switch Blocks Mod wiki

This wiki contains information needed to use the mod as a map creator or just information if your are curious about the details of the block types.


Block types

The mod adds various block types that use different mechanics of the game to determine a state. This state then dictates if a block is solid or not, functioning or not, or if wind direction changes.

Auto

The auto block type uses the in-game time and a specified duration to define its state automatically switching back and forth.
This block type supports safe switching.
As the state is tied to in-game time preventing the switch from happening using safe switching will not pause the duration. The block type will continue cycling as normal.

Big Brian's Guide To Syncing

For music to be in sync with the auto block type follow these steps.
This guide will be based on using Audacity v3.4 or higher. Any sound editing software will work, but it's convenient if you can snap to beats.

  1. Select music that has one solid tempo throughout.
  2. Determine the exact tempo(bpm) of the song. (There are online tools that can help with this)
  3. Create an empty audacity project. Under View -> Toolbars enable Time Signature and Snapping. Set the tempo to the song's bpm. Adjust the time signature if needed. Right click on the timeline and switch to "Beats and Measures".
  4. Drag the song into Audacity. MAKE SURE YOU DO THIS ONLY AFTER STEP 3 BECAUSE AUDACITY IS STUPID.
  5. Remove any dead space before the song. Then enable Snap, set it to 1/4 and make a cut at the end of the loop. To test if the loop is good, enable looping (L) and then set the looping region to be the entire song.
  6. Determine the amount of switches you want to happen during the loop. For doing one switch per bar, simply take the number on the timeline at the end of the song AND SUBTRACT ONE.

Now we'll do some simple math. The values we need are the number of switches, and song length. As an example I'll go with 80 switches and a song of length 166.956 seconds.

  1. Divide Song Length by the Amount of Switches. example: 166.956 / 80 = 2.08695
  2. Divide by 0.017s and round to the closest integer. 2.08695 / 0.017 = 122.76176, so it rounds up to 123.
  3. Multiply that number (example: 123) by 0.017s. example: 123 * 0.017 = 2.091
  4. Set this value for the duration of auto blocks in blocks.xml
  5. Multiply this value by Amount of Switches to get a target length. example: 2.091 * 80 = 167.28. This should be fairly close to the original song length.
  6. Back in Audacity, use Effect -> Pitch and Tempo -> Change Speed and Pitch to set the song to the target length.
  7. Export audio as a .wav
  8. Add the song to the map. Make sure in values.xml restart is set to true. Use a Reset lever timed with a screen transition to start the sync.

Try his map!

Basic

The basic block type uses levers to switch state keeping the state until a lever is touched again.

Countdown

The countdown block type uses levers to switch state the in-game time and a specified duration to define how long a state switch lasts.
This block type supports safe switching.
Preventing the switch from happening using safe switching will delay the switch until it is safe to do so.

Group

The group block type creates multiple groups that act independently from each other using an id system.
This is an advanced block. It may strongly affect load times as well as performance.

Jump

The jump block type uses the players jump to switch state. This block type supports safe switching.
Preventing the switch from happening using safe switching will delay the switch until it is safe to do so. Should it never be safe to switch during a jump the planned switch will be cancelled as soon as the player lands.

Sand

The sand block type functions similar to the basic block type.
However where the basic sand block is either active or not, based on state, the sand provided by this block type switches between the sand block carrying the player down or up.

Sequence

The sequence block type creates multiple groups that, like a sequence, are dependent on the interaction of the player with the group of the previous id.
This is an advanced block. It may strongly affect load times as well as performance.

Threshold

The threshold block type switches state based on a stat threshold.
This block type supports safe switching.
Preventing the switch from happening using safe switching will delay the switch until it is safe to do so.


Folder structure

All files required for the mod are placed inside a switchBlocksMod folder.

switchBlocksMod
├───audio
├───auto
├───basic
├───countdown
├───group
├───jump
├───sand
├───saves
├───sequence
├───templates
├───textures
└───threshold

When starting the game in debug mode switch blocks provide a pause menu item that lets you generate the folder structure automatically, assuming it can find the Worldsmith folder structure.
The generated folders will consist only of folders that are used inside the map.

Legacy files

These files can be removed safely and are no longer read like the legacy save file, an extension-less file from the very beginnings of the mod, or the cache files from the beginnings of the group and sequence block types.

Clone this wiki locally