Fixes 2 dupe glitches involving presents, the Pride wrapping paper being unobtainable, and a quick-crafting fix.#894
Conversation
… count of 1 instead of the original count.
PresentBlock now handles present variant switching in getStateForPlacement()
…eing in the #minecraft:flowers tag and that check preceding the spore blossom check.
… in the player's inventory.
|
Good catch with the wrapping paper! How did you get presents with content to stack? They should not be able to accept items when having a count >1 or be able to stack at all. |
|
I got presents with content to stack by splitting them into single stacks, splitting the item I wanted to dupe into equal stacks, putting the content in each present one by one, then stacking them. |
|
Changing the presents stack size to 1 should mitigate this issue partially: cc3bfb7 I will see if that allows us to skip the mixin. |
|
That seems to work nicely! Can you review / rest again, please? |
|
The issue with the player's profile not being assigned when quick-crafting in specifically the player's inventory crafting menu reappears without the mixin. This is because Vanilla fixes this in Ultimately this is a small issue, and I understand not wanting to have a whole mixin for a super-edge case that is not very harmful such as this - it's just an issue I encountered while testing the other bugs. Demo video of the bug: |
Problems
WrapPresentRecipes copy the input present stack into the output slot - including its count. This enables a duplication glitch involving input present stacks of size greater than 1.PresentBlocks currently have a similar issue; copying the entire stack regardless of count. This enables a duplication glitch triggered by placing a present from a stack of size greater than 1 - breaking the present will yield the stack that was originally used to place it, including its count, even though only 1 present was consumed to place it.PRIDEwrapping paper - however it currently grantsSTRIPEDdue to Spore Blossoms being in the#minecraft:flowerstag, which is checked first.PROFILEcomponent to not be populated.Changes
WrapPresentRecipehas been tweaked to only copy the input present stack with a count of 1, fixing the duplication glitch.PresentBlocknow only copies the stack used to place it with a count of 1, fixing that duplication glitch.STRIPEDWrappingPaper has been moved to the bottom of the if/else chain inWrapPresentRecipe.getPresentForStack()as it's the most broad.InventoryMenu.moveItemStackTo()that callsItem.onCraftedBy()before the quick movement operation is run, allowing the changes to be applied properly. This mixin checks if the output item is an instance ofPresentBlockItembefore calling the method to preserve behavior of other items.Testing
PROFILEcomponent is updated as expected.