I have a Minecraft Purpur 1.21.11 plugin called LuckyBlockLegends. It already
has two working animated lucky block outcomes you built previously: "Prize
Wheel" and "Jackpot Wheel" โ they spawn a ring of ItemDisplay entities
(billboard CENTER, glowing, viewRange 16) around the block-break location,
orbit them via Bukkit.getScheduler().runTaskTimer over ~45 ticks, then cancel
the task, remove the displays, and hand out a reward.
I'd like a few more animated outcomes in that same style. Each one is:
- Registered in OutcomeRegistry.buildOutcomes() via:
this.add("", "", , outcomeContext -> this.execute(outcomeContext));
- Implemented as a private method taking an OutcomeContext, which exposes:
outcomeContext.getLocation(), outcomeContext.world(), outcomeContext.getPlayer(),
outcomeContext.getRandom(), plus helpers: giveMaterial(name, amount), give(ItemStack),
effect(potionName, durationTicks, amplifier), experience(amount), particle(name, count),
sound(name), safeExplosion(power), lightning(), heal(amount), feed(amount), launch(power).
- this.itemFactory.createMaterialItem(name, amount) makes the ItemStack for a display.
Please:
1. Build 2-4 new animations using only that existing API (no new dependencies).
2. Actually test them on a real 1.21.11 server before sending them back - I need
working, verified code, not just something that compiles.
3. Give me either the updated OutcomeRegistry.java (or just the new methods plus
the exact this.add(...) lines to insert), or a full updated jar - whichever's
easier on your end.
Separately: my other AI assistant found and fixed a real bug in
ItemFactory.createSpecialItem - it built an attribute-modifier key with two
colons ("luckyblocks::"), which is invalid for
Bukkit's NamespacedKey (only one colon allowed) and threw a
NullPointerException on every gear/armor item. It's fixed now (hyphen instead
of the second colon), but if you still have the original source for that
method, a second look/confirmation would be great.