Add extra Brewing Stand slot functionality. #1

Closed
opened 2026-06-16 07:04:13 -04:00 by Cow · 0 comments
Owner

Now that the Brewing Stand has had its menu replaced...

We must now implement the (de)serialization side of the new slots.

This will be done via a Block Entity Cowponent, meaning we must use Cowponents: Core and Cowponents: Block Entities as a dependency. Modding/cowponents

The below version string may be used for now.
0.1.0-dev.42ede1c742+26.1.x

The Cowponent will contain a class that extends NonNullList<ItemStack> which will allow for equals and hashCode based on the ItemStack's item, count, and patch values.

This will add 2 slots, slots 5 and 6. Slots 0-4 are vanilla's slots.
Panacea Brewing Stand Slot Mappings

This will then be mixin'd to the following methods within BrewingStandBlockEntity, to create the new inventory.

@ModifyReturnValue(method = "getItems", at = @At("RETURN"))
private NonNullList<ItemStack> panacea$getItemsWithExtraSlots(NonNullList<ItemStack> original) {
// FIXME: Get extra items properly.
return ExtendedNonNullList.withExtraSize(original, PanaceaBrewingStandMenu.ADDED_SLOT_COUNT);
}

@Inject(method = "setItems", at = @At("TAIL"))
private void panacea$setItemsWithExtraSlots(NonNullList<ItemStack> items, CallbackInfo ci) {
// FIXME: Set extra item slots.
}

Now that the Brewing Stand has had its menu replaced... We must now implement the (de)serialization side of the new slots. This will be done via a Block Entity Cowponent, meaning we must use Cowponents: Core and Cowponents: Block Entities as a dependency. [Modding/cowponents](https://git.greenhouse.lgbt/Modding/cowponents) The below version string may be used for now. `0.1.0-dev.42ede1c742+26.1.x` The Cowponent will contain a class that extends `NonNullList<ItemStack>` which will allow for `equals` and `hashCode` based on the ItemStack's `item`, `count`, and `patch` values. This will add 2 slots, slots 5 and 6. Slots 0-4 are vanilla's slots. ![Panacea Brewing Stand Slot Mappings](/attachments/e26005e5-8140-4d92-98aa-271babd021e8) This will then be mixin'd to the following methods within BrewingStandBlockEntity, to create the new inventory. https://git.greenhouse.lgbt/Modding/panacea/src/commit/7876e122db42deaca5a81ba5af1e69cf88860796/src/main/java/lgbt/greenhouse/panacea/mixin/Mixin_BrewingStandBlockEntity.java#L120-L124 https://git.greenhouse.lgbt/Modding/panacea/src/commit/7876e122db42deaca5a81ba5af1e69cf88860796/src/main/java/lgbt/greenhouse/panacea/mixin/Mixin_BrewingStandBlockEntity.java#L126-L129
5.2 KiB
Cow added reference 26.1.x 2026-06-16 07:35:00 -04:00
Cow self-assigned this 2026-06-17 20:26:54 -04:00
Cow referenced this issue from a commit 2026-06-18 05:44:16 -04:00
Cow closed this issue 2026-06-18 05:44:43 -04:00
Cow referenced this issue from a commit 2026-07-22 03:05:19 -04:00
Cow referenced this issue from a commit 2026-07-22 03:06:50 -04:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Modding/panacea#1
No description provided.