Skip to content

Comments

Migrate custom item v1 capitalized item names into lowercase#6201

Merged
onebeastchris merged 1 commit intoGeyserMC:masterfrom
onebeastchris:fix/uppercasecustomitemnames
Feb 21, 2026
Merged

Migrate custom item v1 capitalized item names into lowercase#6201
onebeastchris merged 1 commit intoGeyserMC:masterfrom
onebeastchris:fix/uppercasecustomitemnames

Conversation

@onebeastchris
Copy link
Member

Resolves #6193

Copilot AI review requested due to automatic review settings February 20, 2026 22:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an IllegalArgumentException that occurs when custom items with uppercase letters in their names are registered via the deprecated v1 API. The issue was reported in #6193 where the Slimefun Geyser Extension was using item names like "BASE" which violated Minecraft's identifier format requirements ([a-z0-9_-./]+).

Changes:

  • Automatically converts v1 custom item names to lowercase when creating item definitions to ensure identifier validity
Comments suppressed due to low confidence (1)

core/src/main/java/org/geysermc/geyser/item/GeyserCustomItemData.java:148

  • Consider adding a warning when the item name contains uppercase letters that are being automatically converted to lowercase. This would help extension developers understand that their item names should be lowercase and update their code accordingly. The warning could be similar to the existing warnings for deprecated features like textureSize and renderOffsets (lines 278-286).
        GeyserCustomItemDefinition.Builder definition = (GeyserCustomItemDefinition.Builder) CustomItemDefinition.builder(Identifier.of("geyser_custom", name().toLowerCase(Locale.ROOT)), javaItem)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@onebeastchris onebeastchris merged commit ac5aa54 into GeyserMC:master Feb 21, 2026
6 checks passed
@onebeastchris onebeastchris deleted the fix/uppercasecustomitemnames branch February 21, 2026 00:44
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.

IllegalArgumentException: Non [a-z0-9_\-./]+ character in value of Key[geyser_custom:BASE] on startup

1 participant