Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.18.1] Suppressed "Gave 0 [Air]" message when trying to obtain item with full stack of the item already in cursor. #3246

Open
wants to merge 4 commits into
base: 1.18.1
Choose a base branch
from

Conversation

cjapar2
Copy link

@cjapar2 cjapar2 commented Jun 13, 2023

Fixes issue #2677.

Added the following if-statement to check if the current stack on the cursor is less than the maximum stack allowed. This makes it so that the game doesn't unnecessarily try to give you more of the item than it can. As a result, the "Give Air" message does not appear in the chat and console log.

if (player.inventoryMenu.getCarried().getCount() < player.inventoryMenu.getCarried().getMaxStackSize()) {
	Network.sendPacketToServer(packet);
}

@CLAassistant
Copy link

CLAassistant commented Jun 13, 2023

CLA assistant check
All committers have signed the CLA.

@mezz mezz changed the base branch from 1.20 to 1.18.1 June 17, 2023 03:34
@mezz
Copy link
Owner

mezz commented Jun 17, 2023

Thanks for contributing!
Your fix seems to target setHotbarStack, is that really what fixes the bug described in the issue?

Also if you want to fix this in 1.18.2, the normal branch to use is 1.18
I just have the 1.18.1 branch for that specific version but it's not used by many people.

@mezz mezz changed the base branch from 1.18.1 to 1.18 June 17, 2023 18:32
@mezz mezz changed the base branch from 1.18 to 1.18.1 June 17, 2023 18:32
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.

4 participants