From 7c49b93abfcbea7acd9935ba6419e15adcf0db33 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 4 Apr 2023 10:05:58 +0200 Subject: [PATCH] Fix WingDesign --- .../lobby/otherparticle/WingDesign.java | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/de/steamwar/lobby/otherparticle/WingDesign.java b/src/de/steamwar/lobby/otherparticle/WingDesign.java index a0a9379..c1687ed 100644 --- a/src/de/steamwar/lobby/otherparticle/WingDesign.java +++ b/src/de/steamwar/lobby/otherparticle/WingDesign.java @@ -27,15 +27,28 @@ public interface WingDesign { return vectors.toArray(new Vector[0]); } + class WingDesignImpl implements WingDesign { + private final Vector[] vectors; + + public WingDesignImpl(Vector[] vectors) { + this.vectors = vectors; + } + + @Override + public Vector[] getVectors() { + return vectors; + } + } + Vector[] getVectors(); - WingDesign SIMPLE = () -> create("/de/steamwar/lobby/particle/decorator/WingSimple4.png"); - WingDesign COMPLEX = () -> create("/de/steamwar/lobby/particle/decorator/WingSimple2.png"); - WingDesign SWORD = () -> create("/de/steamwar/lobby/particle/decorator/WingSword.png"); - WingDesign SW = () -> create("/de/steamwar/lobby/particle/decorator/WingSW.png"); - WingDesign WGS = () -> create("/de/steamwar/lobby/particle/decorator/WingWGS.png"); - WingDesign SWORD_CROSSED = () -> create("/de/steamwar/lobby/particle/decorator/WingSwordCrossed.png"); - WingDesign MWGL = () -> create("/de/steamwar/lobby/particle/decorator/MWGL.png"); + WingDesign SIMPLE = new WingDesignImpl(create("/de/steamwar/lobby/particle/decorator/WingSimple4.png")); + WingDesign COMPLEX = new WingDesignImpl(create("/de/steamwar/lobby/particle/decorator/WingSimple2.png")); + WingDesign SWORD = new WingDesignImpl(create("/de/steamwar/lobby/particle/decorator/WingSword.png")); + WingDesign SW = new WingDesignImpl(create("/de/steamwar/lobby/particle/decorator/WingSW.png")); + WingDesign WGS = new WingDesignImpl(create("/de/steamwar/lobby/particle/decorator/WingWGS.png")); + WingDesign SWORD_CROSSED = new WingDesignImpl(create("/de/steamwar/lobby/particle/decorator/WingSwordCrossed.png")); + WingDesign MWGL = new WingDesignImpl(create("/de/steamwar/lobby/particle/decorator/MWGL.png")); - WingDesign ECLIPSE = () -> create("/de/steamwar/lobby/particle/decorator/ECLIPSE-Logo.png"); + WingDesign ECLIPSE = new WingDesignImpl(create("/de/steamwar/lobby/particle/decorator/ECLIPSE-Logo.png")); }