Skip to main content

Cubes

Introduction

Cubes are physical puzzle objects that obey gravity, can be grabbed and carried by players, traverse plugin portals, and either block or transform lasers depending on their type.

Cubes are dispensed by Cube Distributors through linked Cube Creation Buttons, and exist purely at runtime — they are not saved to disk and disappear on server restart, area reset, or area unload.

Cube types

Two types of cubes share the same physics and grab mechanics, but interact with lasers differently:

TypeVisualLaser interaction
Standard cubePlain faceOpaque blocker. Lasers stop at the cube's hitbox.
Cube concentratorBeacon-style faceColor combiner. Absorbs every laser that hits it during a tick, fuses their colors using the standard color addition rules, and re-emits a single laser of the resulting color in the cube's emission direction. Light level is the maximum of the absorbed lasers.

A cube's type is decided by its parent Cube Distributor's configuration — switching the distributor between standard and concentrator changes the type of every cube it produces from that point on.

Spawn

Pressing a Cube Creation Button while its parent Cube Distributor is activated dispenses a cube in the block immediately below the distributor. The cube appears at scale 0.1 and grows to its full size over half a second, with a purple particle swirl at the distributor and a column of light particles flowing down to the cube. A distinctive chord plays at spawn.

Each distributor owns at most one cube at a time. Pressing a linked button while a cube already exists replaces the previous one — the old cube is destroyed before the new one spawns. The spawn fails (failure sound + translated error in chat) if the block below the distributor is a solid block, lava, or already occupied by another distributor's cube.

Physics

Once dispensed, a cube falls under custom gravity. Its physics is independent from vanilla Minecraft block or entity physics:

SituationBehavior
Empty space below the cubeFalls under custom gravity (gentler than vanilla, with a configurable terminal velocity).
Solid block belowLands on top of the block. The cube snaps to the block's center horizontally.
Another cube belowStacks on top — each landed cube has its own collision box, so cubes pile up cleanly.
Falls into waterContinues falling, slowed by a deceleration factor.
Falls into lavaDestroyed.
Crosses the puzzle area's bounding boxDestroyed.
Player or mob in the wayCube lands anyway; the entity is naturally pushed out by the cube's collision box.
Mob or projectile collides with the cubeIgnored — cubes are not affected by entity collisions.
Piston tries to push or pull the cubeNo effect. Pistons cannot move cubes by design.

Landed cubes get an invisible solid collision box at their position so players and mobs can walk on top of them.

Grab and carry

Players can pick up cubes and move them by hand:

  • Right-click on a cube (its visible head, or the block where its collision box sits) to grab it. The cube floats in front of the player.
  • Right-click on any block while holding a cube drops it (release).
  • Right-click in the air while holding a cube also drops it.
  • Left-click anywhere while holding a cube drops it.

A player can hold at most one cube at a time. Right-clicking a different cube while already holding one is silently ignored — drop the current cube first if you want to switch.

While held, the cube sits at a fixed distance in front of the player along their crosshair, snapped to the center of the block grid horizontally (only the vertical position keeps a decimal value). The cube's visual face rotates to point in the direction the player is facing horizontally — looking up or down does not tilt the cube. A cube concentrator emits in the same horizontal direction.

If the target position in front of the player is inside a solid block, the cube falls back to the player's feet so it stays visible.

Action lockout while holding

To match the feeling that the cube fully occupies the player's hands, almost every other interaction is suspended for as long as a cube is being carried:

ActionAllowed while holding?
Walk, run, jump, swim, sneak
Look around (the cube tracks the crosshair)
Right- or left-click to drop the cube
Open inventory (E)
Drop item (Q)
Swap hands (F)
Change hotbar slot (mouse wheel, 1–9)
Right-click on any other component (mirror, lock, distributor, sender, …)
Left-click on any other component
Use the Portal Gun
Open the editor's component shortcut bar

Drop the cube to interact with anything else.

Drop on disconnect or death

If the carrying player disconnects or dies while holding a cube, the cube is dropped at the player's last position — it is never lost.

Concentrator emission direction

When you release a cube concentrator, the player's look direction at the moment of release is snapped to the nearest of 16 horizontal directions (every 22.5°). That snapped direction becomes the cube's emission direction and is locked until the cube is grabbed again. Re-grabbing and re-dropping the cube overwrites the direction.

While a cube concentrator is held, its emission tracks the player's horizontal facing in real time. The vertical component of the player's look is ignored — the laser always flies horizontally.

The re-emitted laser starts just outside the cube's collision box along the emission direction, so the cube does not absorb its own emission.

Interaction with portals

Cubes interact with Portal Gun portals in three ways:

  • A falling cube that crosses a portal's plane is teleported to the linked portal and continues falling from there, conserving its velocity along the exit portal's normal.
  • A held cube traverses portals together with its holder — the cube follows the player through the portal naturally.
  • A portal placement raycast that hits a cube before reaching its target Portal Surface is rejected with a translated error and a failure sound. Move the cube out of the way to place the portal.

Cube on a Cube Pressure Plate

When a cube lands on a Cube Pressure Plate, it activates the plate for as long as it remains on top of it. Held or falling cubes do not count — only a landed cube on the plate's block triggers activation. Picking the cube up, destroying it, or letting it leave the plate's block deactivates the plate.

Lifecycle and destruction

A cube is destroyed when:

  • Its parent Cube Distributor is deleted.
  • The block it was about to land in is replaced (e.g. a Laser Solidifier materializes glass in mid-fall) — the cube falls through normally if the new block is non-solid, or lands on the new block if it is solid.
  • It leaves the area's bounding box while falling.
  • It falls into lava.
  • The puzzle area is reset or unloaded.
  • A new cube is dispensed from the same distributor (replaces the previous one).

The carrying player loses the cube only on disconnect or death — those drop the cube rather than destroying it.

Known issues

No known issue currently.

See our issue board for more information.