WheelComponent
A prize wheel that spins and lands on the segment it was told to.
Java
Inside a PanelComponent constructor. The same call draws in every family and chroma.
Java
WheelComponent wheel = add(new WheelComponent(at(new Box("wheel", 10, 10, 120, 120)))
.add(new WheelComponent.Segment("Diamond").item("minecraft:diamond").weight(1))
.add(new WheelComponent.Segment("Iron").item("minecraft:iron_ingot").weight(4))
.add("Nothing")
.onLand(s -> give(s)));
// Multiplayer: the server picks the landing and a seed and sends both, everyone calls the same line.
wheel.spin(landing, seed);Items
