mojira.dev
MC-275021

SetComponentsFunction datagen cannot set multiple components

The `SetComponentsFunction` loot table function has a private constructor for a `DataComponentPatch`, which can contain multiple data components.

However, the only public way to create this function is via the `setComponent` static method, which only accepts a single component.

This makes it impossible to use this function to generate more than one component on an item in a concise manner; thus it's possible to manually write a loot table JSON that's impossible to datagen.

Comments 1

Thank you for your report!
After consideration, the issue is being closed as Invalid.

This report does not describe a bug.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Gavin Lambert

(Unassigned)

Plausible

Loot tables

1.21

Retrieved