Add extra Brewing Stand slot functionality. #1
Labels
No labels
Compat
Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Port
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
End of Life
Reviewed
Invalid
Reviewed
Won't Fix
Security
Status
Abandoned
Status/Accepting External PR
Status
Blocked
Status
Need More Info
Status
Needs Triage
Testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Modding/panacea#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.xThe Cowponent will contain a class that extends
NonNullList<ItemStack>which will allow forequalsandhashCodebased on the ItemStack'sitem,count, andpatchvalues.This will add 2 slots, slots 5 and 6. Slots 0-4 are vanilla's slots.

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.}