Vault Drawers (0.0.0-beta.9)
Curse Maven Snippet
What's new
v0.0.0-beta.9 - Drawers accept and dispense items again
Fixed
- Crash placing 3-slot compacting drawers:
BlockEntityDrawersComp.create(slotCount)andBlockEntityDrawersStandard.create(slotCount)ignored theslotCountargument and always returned the 2-slotBlockEntityType(FRACTIONAL_DRAWERS_2/STANDARD_DRAWERS_1). Placing acompacting_drawers_3(or a 2/4-slot standard drawer) produced a block entity that did not match the block andBlockEntity.validateBlockStatethrewIllegalStateException. Each factory now picks the correctBlockEntityTypefor itsslotCount. - Drawers would not accept or dispense items: the interaction layer of
BlockDrawersandBlockEntityDrawerswas unported (useSlot/useSlotInvertible/putSlot/takeSlotreturnedPASS,interactPutItemsIntoSlotwas empty,takeItemsFromSlotreturned empty). Ported from upstream Storage Drawers: insert (right-click = 1, double-click = dump matching inventory), extract (left-click = 1, alt action = full stack), open the upgrade UI with Shift + empty hand,setPlacedByportable-data read, drops, and detached-drawer pull/return (drawer_puller/ detached drawer). - "Stack Limit: 0" — storage capacity was zero: the block entities' inner data classes (
GroupData/DrawerData) had lost their overrides.StandardDrawerGroup.DrawerData.getStackCapacity()andFractionalDrawerGroup.getStackCapacity()return0in the base class and the block-entity subclasses must supply the real value. Restored:getStackCapacity(getStorageMultiplier() × getEffectiveDrawerCapacity()),onItemChanged/onAmountChanged(persistence and client count sync),getWorldon compacting drawers (updates theSLOTSblock state), andinjectPortableData(group)in both constructors (contents were not being saved). Removed two incorrectgetDrawerCapacity()overrides that recursed to0; the parent implementation based ongetStorageUnits()is used instead. AddedBlockEntityDrawers.syncClientCount.
Technical Changes
- 1.21 → 26.2 API adaptations in the ported methods:
Level.isClientSide→isClientSide(),Level.random→getRandom(),Inventory.selected→getSelectedSlot(),Player.displayClientMessage(Component, boolean)→sendSystemMessage(Component),DataComponents.BLOCK_ENTITY_DATAis nowTypedEntityData<>(notCustomData) →getUnsafe(), inner classContentProviderinstantiated viabe.new ContentProvider(...). Block#onRemovedoes not exist in 26.2: the method added during the port was removed; DROP-mode content drops and KEEP-modeBLOCK_ENTITY_DATApreservation are left as a TODO to port withBlockEntity#preRemoveSideEffects.
Known Gaps (not yet ported)
- Rendering of the stored item on the drawer face (
BlockEntityDrawersRenderer) and its client registration. - Drawer Controller logic (
BlockEntityController): block scanning and inventory aggregation.
JAR: vault_drawers-26.2-neoforge-26.2.0.57-0.0.0-beta.9.jar
Tag: 26.2-neoforge-beta.9
All Relations
- All Relations
- Embedded Library
- Optional Dependency
- Required Dependency
- Tool
- Incompatible
- Include
This mod has no related projects

