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

Added display of custom item sources in InventoryHud #4747

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

Conversation

Kirkezz
Copy link

@Kirkezz Kirkezz commented Jul 15, 2024

Type of change

  • New feature

Description

Added ability to display items not only from inventory or container in hand, but also from custom sources in InventoryHud. Added incomplete support for inventories of arbitrary size (Texture and Outline backgrounds cannot be used for inventories with size other than 9x3).

To add a new source, you have to add code to enum SupportedSources to handle it.

As an example, the functionality was implemented for the Nametags module. When selecting the source Nametags, items in the rendering distance are displayed as a table, the size of which can be customized. The getItems() function was added, and a filter was also added to filter out items such as mushrooms, which are often a false indication of player activity.

Related issues

Mention any issues that this pr relates to.

How Has This Been Tested?

meteor1
meteor2
meteor3

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

@Kirkezz Kirkezz marked this pull request as draft July 23, 2024 06:14
@Kirkezz Kirkezz marked this pull request as ready for review July 24, 2024 13:21
@Kirkezz Kirkezz requested a review from RacoonDog July 25, 2024 09:00
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.

2 participants