Skip to content

server/block: Add buttons, pressure plates and redstone lamp - #1327

Open
cqdetdev wants to merge 12 commits into
df-mc:masterfrom
cqdetdev:feat/redstone-sources
Open

server/block: Add buttons, pressure plates and redstone lamp#1327
cqdetdev wants to merge 12 commits into
df-mc:masterfrom
cqdetdev:feat/redstone-sources

Conversation

@cqdetdev

Copy link
Copy Markdown
Collaborator

Implements the redstone power sources that were narrowed out of the world-owned redstone engine PR (#1250), building on the merged. Part of the redstone feature tracking issue (#1228):

  • Buttons (wood, stone, polished blackstone — all 14 materials)
  • Pressure plates (stone, wooden variants)
  • Weighted pressure plates (light/heavy, analog 1–15)
  • Redstone lamp

cqdetdev added 2 commits July 13, 2026 10:50
Port the redstone power sources narrowed out of the world-owned engine
review (df-mc#1250) onto the merged engine: buttons of every material with
press scheduling, stone/wooden pressure plates, light and heavy weighted
plates with analog 1-15 output based on entity count, and the redstone
lamp driven through RedstonePowerConsumer. Pressure plates react to
entities through EntityStepOn and scheduled release ticks, ignoring
snowballs and, for stone-like plates, non-living entities, matching
vanilla behaviour.

Materials are modelled as ButtonType and PressurePlateType following the
established *_type.go value type convention. Adds the pressure plate
click sounds and their level sound event mappings.
Non-player entities now trigger EntityStepper blocks: entity movement
checks the block stood on after each tick like players do, letting mobs,
items and projectiles activate pressure plates.

Wooden buttons are pressed by arrows. Projectiles notify the block of
the cell they come to rest in, since blocks without a collision box are
passed through by the trace, and a wooden button stays pressed while an
arrow rests inside it.

Redstone lamps now turn off after two redstone ticks instead of
immediately, keeping them lit through short pulses. Buttons and
pressure plates drop their unpowered forms so a replaced component
cannot start permanently powered, and crimson and warped variants are
no longer usable as furnace fuel, matching WoodType.Flammable.
Comment thread server/entity/movement.go Outdated
HashimTheArab and others added 4 commits July 14, 2026 12:51
Redstone lamps now turn off after three redstone ticks (six game ticks)
to match Bedrock; the previous two-tick delay was the Java value.

Wooden buttons and pressure plates are now axe-effective, while stone,
polished blackstone and weighted variants stay pickaxe-effective.

Pressure plates recompute their power on the rising edge only and let the
scheduled tick keep the weighted level current, matching the vanilla
periodic re-check and avoiding a per-entity rescan each tick. The click
sound now plays only when a plate first activates.

Snowballs are no longer excluded from activating wooden and weighted
plates, which react to any entity in vanilla.
@HashimTheArab
HashimTheArab force-pushed the feat/redstone-sources branch from 2a56ff7 to 721a0fb Compare July 20, 2026 02:14
@HashimTheArab
HashimTheArab force-pushed the feat/redstone-sources branch from 7475b05 to 093ce67 Compare July 20, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants