Skip to content

Add SulfurCube#equipItem#14062

Open
Strokkur424 wants to merge 1 commit into
PaperMC:mainfrom
Strokkur424:feat/sulfur-cube-equip-item
Open

Add SulfurCube#equipItem#14062
Strokkur424 wants to merge 1 commit into
PaperMC:mainfrom
Strokkur424:feat/sulfur-cube-equip-item

Conversation

@Strokkur424

Copy link
Copy Markdown
Member

This PR exposes the NMS-internal SulfurCube#equipItem method as an API-method.

Currently, if you want to set the item swallowed by a SulfurCube, you have to call the following code:

cube.getEquipment().setItem(
  EquipmentSlot.BODY,
  ItemType.BIRCH_LOG.createItemStack()
);

This is fine if you know about it. However that skips a little bit of logic that's inside the NMS SulfurfCube#equipItem method. Additionally, it's not intuitive for anyone simply scrolling through the SulfurCube API methods.

(Discussion: https://discord.com/channels/289587909051416579/925530366192779286/1526310872450994318)

@Strokkur424 Strokkur424 requested a review from a team as a code owner July 13, 2026 21:28
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Jul 13, 2026
@mbax

mbax commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

If it isn't just a shortcut to editing the equipment I'm not sure I like it being called equipItem. Especially with the potential dropping of another item. I want some more thoughts on naming. I like SulfurCube#swallow(ItemStack)

Alternatives I thought of:

  • Engulf
  • SwallowAndMaybeBarf
  • Nom

@Doc94

Doc94 commented Jul 13, 2026

Copy link
Copy Markdown
Member

Well its based in the nms method maybe just a tryEquipItem but the original name is fine to me... (maybe can mention the events for what this method can pass?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

3 participants