project - icon

Switchy

Server mod

Commands for switching between nothing - which includes nicknames, origins, skins, inventories, and more.

LibrarySocialUtility

450 downloads 6 followers
Created 2 months ago
Updated 13 days ago

External resources



Project members

profile-picture

Technical information

License
Client side
optional
Server side
required
Project ID
ss0QuCRx

switchy banner

An extensible preset system for player customizations provided by other mods.
Works in singleplayer and on server-side.


What is Switchy?

Switchy is a mod that lets you make presets using commands. The presets don't do anything.

Thankfully, Switchy is loaded with modules that make presets do things. Mostly things from other mods.

How do you use it?

First, install a vanilla add-on or any compatible mod (see modules).

Use /switchy list to see your current presets.

Then, use /switchy rename default [name] to give your starting preset a name.

/switchy new [name] will create and switch to a new preset.

/switchy set [name] or /switch [name] will switch between existing presets

When a module is Enabled, it makes things "switch" per-preset. Using /switchy module enable/disable [name] allows you to toggle this behaviour for just your presets.

Switchy provides no ability for server owners to enable or disable modules server-wide.

For more commands, type /switchy help

Modules

Switchy itself comes packaged with modules for:

Further modules can be added from these addons:

  • Switchy Inventories - Addon for minecraft.
    • Allows for separate inventories, ender chests, and trinket inventories.
    • Each module is disabled by default, allowing players to enable them individually.

Showcase

Design - Modules

Switchy, at its core, is a mod that gives you a list of empty presets. You can add to the list, set what preset is "current", and so on, but none of these presets do anything.

At its core - Switchy is a mod that does nothing - and that's key to its design.

Switchy modules provide switchy with all of its practical functionality, but despite this, they're only required to do four things:

  • Save themselves to an NBT Compound.
  • Load themselves from an NBT Compound.
  • Read data to themselves from the player.
  • Apply data from themselves to the player.

Because mods, and minecraft itself, often have to do these things already, compatibility modules are often extremely simple to write (the Switchy Inventories module took 5 lines of code.)

We hope players and developers find this useful.

Developing Addons

If you'd like to develop your own addon module, feel free to clone the Inventories Module to get started.

Otherwise, all an addon mod needs to do is create a module class that implements api.PresetModule and registers itself using the api.PresetModuleRegistry - Go wild!

Further Info

All mods are built on the work of many others.

Created for ModFest: Singularity

We made this mod (up to v1.2.1) for Modfest: Singularity! However, we intend to maintain this mod into the future.

This mod is included in Tinkerer's Quilt - our modpack all about ease of play and ease of expression.

This mod is primarily motivated by improving accessibility for plural systems. We support the Plural Respect Document - its perspectives largely reflect our own.

We're primarily modpack developers - not mod developers! If you want to port this mod, do it yourself!

Though feel free to let us know if we can spruce anything on the implementation side - PRs and issues with code snippets are welcome as long as you can help us understand them.