Skip to content

Shelf#1256

Open
AssassinGhostYT wants to merge 9 commits into
df-mc:masterfrom
AssassinGhostYT:Shelf
Open

Shelf#1256
AssassinGhostYT wants to merge 9 commits into
df-mc:masterfrom
AssassinGhostYT:Shelf

Conversation

@AssassinGhostYT

Copy link
Copy Markdown
Contributor

Feature Implementation: Minecraft Shelf Block

This update introduces the official Shelf block (including all 12 wood variants and
Bamboo) with full Bedrock-accurate functionality and properties.

Key Features:

  • 3-Slot Interactive Inventory: Implemented a custom ray-tracing math logic to detect
    player interaction on three distinct sections (Left, Center, Right) without
    modifying the server core.
  • Redstone Integration: Support for powered_bit and powered_shelf_type. Shelves can
    connect to adjacent powered shelves to enable the Hotbar Swapping mechanic
    (swapping 3, 6, or 9 slots depending on the connection).
  • Vanilla Mechanics:
    • Break Logic: Hardness set to 2.0, Blast Resistance to 3.0, and fully
      harvestable with Axes.
    • Fuel Support: Overworld variants act as fuel (smelting 1.5 items).
    • Waterlogging: Full support for sourceWaterDisplacer.
  • NBT Persistence: Complete inventory saving/loading using NBT tags (Items, Facing,
    Powered).
  • Optimized Performance: Uses state-based hashes for all 380+ possible block
    permutations, ensuring high performance during world rendering and updates.
  • Code Quality: Fully compliant with gofmt and golangci-lint (gocritic) standards,
    using idiomatic Go patterns for state management and redstone updates.

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.

1 participant