Place lobby particle entries relative to the body

Entries get a World/Body setting. In body mode offsets, heights and wings
follow the body's facing and lie along the body while gliding or swimming,
so wings stay on the back. Rings circle the body but keep their world
angle, so they do not turn with the player. New wings default to body;
presets and rewards stay in world mode and look exactly as before.
This commit is contained in:
2026-10-26 09:49:11 +01:00
parent c3eda01e20
commit 47f0d9858b
17 changed files with 217 additions and 7 deletions
@@ -41,6 +41,8 @@ public class ParticleTickData {
private final List<Player> viewers;
private boolean onlySelf = false;
private boolean onlyOthers = false;
// Set for entries placed relative to the body, null for world placement
private BodyFrame frame;
public ParticleTickData withLocation(Location location) {
ParticleTickData particleTickData = copy();
@@ -48,6 +50,13 @@ public class ParticleTickData {
return particleTickData;
}
public ParticleTickData withFrame(BodyFrame frame) {
ParticleTickData particleTickData = copy();
particleTickData.frame = frame;
particleTickData.location = frame.getOrigin().clone();
return particleTickData;
}
public ParticleTickData onlySelf() {
ParticleTickData particleTickData = copy();
particleTickData.onlySelf = true;
@@ -68,6 +77,6 @@ public class ParticleTickData {
}
public ParticleTickData copy() {
return new ParticleTickData(world, player, location, deg, isMoving, viewers, onlySelf, onlyOthers);
return new ParticleTickData(world, player, location, deg, isMoving, viewers, onlySelf, onlyOthers, frame);
}
}