null controller for dead units
This commit is contained in:
@@ -153,7 +153,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
|||||||
case type -> type;
|
case type -> type;
|
||||||
case name -> controller instanceof Player p ? p.name : null;
|
case name -> controller instanceof Player p ? p.name : null;
|
||||||
case firstItem -> stack().amount == 0 ? null : item();
|
case firstItem -> stack().amount == 0 ? null : item();
|
||||||
case controller -> controller instanceof LogicAI log ? log.controller : controller instanceof FormationAI form ? form.leader : this;
|
case controller -> !isValid() ? null : controller instanceof LogicAI log ? log.controller : controller instanceof FormationAI form ? form.leader : this;
|
||||||
case payloadType -> self() instanceof Payloadc pay ?
|
case payloadType -> self() instanceof Payloadc pay ?
|
||||||
(pay.payloads().isEmpty() ? null :
|
(pay.payloads().isEmpty() ? null :
|
||||||
pay.payloads().peek() instanceof UnitPayload p1 ? p1.unit.type :
|
pay.payloads().peek() instanceof UnitPayload p1 ? p1.unit.type :
|
||||||
|
|||||||
Reference in New Issue
Block a user