Skip to content

Fixed issues with lidded not closing patch#11370

Closed
Jakush wants to merge 2 commits into
PaperMC:masterfrom
Jakush:fix-containers
Closed

Fixed issues with lidded not closing patch#11370
Jakush wants to merge 2 commits into
PaperMC:masterfrom
Jakush:fix-containers

Conversation

@Jakush
Copy link
Copy Markdown

@Jakush Jakush commented Sep 7, 2024

Hey, currently on latest version of paper, I'm having issues with actually using interface Lidded#close to actually close the container (barrel, shulkerbox or etc...), so I tried fixing it and well it works, I still have to fix some things there as it does not look open but still sends sound (which it shouldn't if it already closed), but I also wanted to hear a feedback before continuing.

Issue (maybe more detailed why): #11364

(sorry for previous invalid PR)

@Jakush Jakush requested a review from a team as a code owner September 7, 2024 13:37
Copy link
Copy Markdown
Contributor

@lynxplay lynxplay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I am reading this wrong, the PlayerInteractEvent is called before the menu (and lidded state) is ever opened/changed.

Even with this (hardcoded as fuck) patch, you'd be too early to call close on the container anyway?

@Jakush
Copy link
Copy Markdown
Author

Jakush commented Sep 7, 2024

Unless I am reading this wrong, the PlayerInteractEvent is called before the menu (and lidded state) is ever opened/changed.

Even with this (hardcoded as fuck) patch, you'd be too early to call close on the container anyway?

I tried running this for example 2 seconds later with scheduler and it still said it is not opened even when I was seeing it as opened. The issue was it just wasn't updated.

@Jakush
Copy link
Copy Markdown
Author

Jakush commented Sep 7, 2024

I can try making it less hardcoded, but it would require making new interface, is that okay?

@Machine-Maker
Copy link
Copy Markdown
Member

Machine-Maker commented Sep 7, 2024

I explained over in the issue why I think the Lidded open/close methods have a more fundamental problem with how lids work in the game.

@Jakush
Copy link
Copy Markdown
Author

Jakush commented Sep 16, 2024

Closing this PR, new better PR by @456dev is here #11379

@Jakush Jakush closed this Sep 16, 2024
@Jakush Jakush deleted the fix-containers branch September 16, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

3 participants