forked from SteamWar/SteamWar
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user