Skip to content

Custom Sabers

Westbot edited this page Jul 9, 2025 · 4 revisions

Custom saber usage

  1. Place an unzipped custom model pack in beatcraft/custom_sabers/
  2. If already in-game then run /custom_sabers refresh
  3. Run /custom_sabers list to list all available saber models. Click on the line in chat to copy the selection data to clipboard
  4. Run /custom_sabers select <data from clipboard> to select the model

(this system will be made more user-friendly eventually)

Custom saber creation

Sabers are made using BlockBench's Java Item/Block format but with specific organization requirements to allow dynamic behaviors per-element.

It's recommended to start with the template: template_saber.zip

Things to note

  • the core of the saber goes from [8, 0, 8] to [8, 50, 8] with the hilt ending and the blade beginning at y=8.
  • when saving, blockbench will warn you about geometry overflow. just hit "ok" and the model will save just fine.
  • elements must be 1 group deep. (I'll maybe fix this at some point)
  • group and element names are used to assign render attributes such as bloom, shaders, tint, and swiveling to face the camera.
  • adding extra data to the json file will persist even if edited by blockbench.
  • each model is limited to 1 texture

Recommended starting point

folder structure

beatcraft/custom_sabers/
├─ example_pack/
│  ├─ model.json
│  └─ texture.png
:

model element hierarchy
image
(any invalid attributes in element names are ignored)

add these to the model json:

{
    "display_name": "Model Name",
    "authors": ["your name"]
}

Attributes

groups and elements' names are used to determine render attributes. elements within a group inherit attributes from that group.
attributes can be separated by a semicolon to have multiple on one element.
Here's a list of all valid attributes and how they work/what they do

colored

element will be tinted with the note color in-game.
this color is multiplied by the texture color

bloom

element will have bloom post-processing applied to it.

swivel:<axis>

axis format regex: (?:x(?<x>[+-]?(?:\d+\.\d*|\.\d+|\d+)(?:[eE][+-]?\d+)?[fF]?)?)?(?:y(?<y>[+-]?(?:\d+\.\d*|\.\d+|\d+)(?:[eE][+-]?\d+)?[fF]?)?)?(?:z(?<z>[+-]?(?:\d+\.\d*|\.\d+|\d+)(?:[eE][+-]?\d+)?[fF]?)?)?
examples:

  • swivel:x
  • swivel:x.5y
  • swivel:xyz.25
  • swivel:y

causes the north side of this element to point towards the camera. only rotates along the specified axis.

shader:<shader>:<args>

allows you to specify a pre-defined shader

Currently available:
see shaders

spin:<axis>:<secondsPerRev>

axis: uses same format as swivel
secondsPerRev: how many seconds it takes to do 1 revolution

Shaders

circle

args:

  • r (float)
    example: shader:circle:r1
    based on this element's uv, a circle with r=1 will draw a filled-in circle (can be tinted, but not textured) in the area [0, 0, 16, 16] centered at [8, 8]
    stretching the element's geometry can turn this into an elipse.

Clone this wiki locally