Skip to content

Hide dropped item names - #33

Open
Jan1k1 wants to merge 2 commits into
Bram1903:mainfrom
Jan1k1:fix/hide-dropped-item-names
Open

Hide dropped item names#33
Jan1k1 wants to merge 2 commits into
Bram1903:mainfrom
Jan1k1:fix/hide-dropped-item-names

Conversation

@Jan1k1

@Jan1k1 Jan1k1 commented Jun 14, 2026

Copy link
Copy Markdown

Fixes #26.

Removes custom_name and item_name components from dropped item metadata before clients receive it.

Tested:

  • .\gradlew.bat :common:build --console=plain

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 430ad76653

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +110 to +111
} else if (entityType == EntityTypes.ITEM) {
spoofDroppedItemMetadata(entityData, settings);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Cache dropped item entities before spoofing metadata

When a dropped item is spawned, EntityTracker.handleSpawnEntity returns for any non-LIVINGENTITY, and repo-wide search shows cache insertion only happens through spawnEntity/addLivingEntity; therefore MetadataSpoofer.onPacketSend sees cachedEntity == null and returns before this new ITEM branch can run. In the inspected SPAWN_ENTITYENTITY_METADATA flow, dropped item custom_name/item_name components are never removed.

Useful? React with 👍 / 👎.

Comment on lines +91 to +92
names:
enabled: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Load the new names toggle from config

When an admin sets spoof.entity-data.items.names.enabled: false, this option has no effect because ConfigManager.setItemOptions still only reads enabled, stack-amount, durability, and enchantments, leaving Settings.Items.names at its default true. This makes the newly documented opt-out ineffective for any loaded configuration.

Useful? React with 👍 / 👎.

@Jan1k1
Jan1k1 force-pushed the fix/hide-dropped-item-names branch from 430ad76 to acca92c Compare June 14, 2026 13:51
@Darwin1546

Copy link
Copy Markdown

It's better to set it to "space" rather than just unsetting it
It will hide vanilla items too

@Jan1k1

Jan1k1 commented Jun 15, 2026

Copy link
Copy Markdown
Author

Sorry, good point. I changed it to set both name components to a single blank space instead of removing them.

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.

[feature] Hide dropped items names

2 participants