(String[] addablesString)
| 63 | } |
| 64 | |
| 65 | private Stack<Addable> loadAddables(String[] addablesString) { |
| 66 | Addable[] addablesPool = { new Block(), new Cactus(), new CssLamp(), new Fence(), new Fire(), new Liquid(), new Pane(), new Slab(), new SnowBlock(), |
| 67 | new StairsEast(), new StairsNorth(), new StairsSouth(), new StairsWest(), new LilypadTf2(), new TallGrassTf2(), new TransparentBlock(), |
| 68 | new EndPortalFrame(), new VinesEast(), new VinesNorth(), new VinesSouth(), new VinesWest(), new TorchNorth(), new TorchSouth(), new TorchEast(), |
| 69 | new TorchWest(), new Torch(), new StairsHighEast(), new StairsHighNorth(), new StairsHighSouth(), new StairsHighWest(), new PlayerSpawnCss(), |
| 70 | new PlayerSpawnTf2(), new SupplyTf2(), new Debug() }; |
| 71 | Stack<Addable> loadedAddables = new Stack<>(); |
| 72 | for (Addable potentialAddable : addablesPool) { |
| 73 | for (String toBeAdded : addablesString) { |
| 74 | if (potentialAddable.getName() |
| 75 | .equals(toBeAdded)) { |
| 76 | for (Addable a : potentialAddable.getInstances()) { |
| 77 | Loggger.log("adding " + a.getName()); |
| 78 | loadedAddables.push(a); |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | return loadedAddables; |
| 84 | } |
| 85 | |
| 86 | private void setAddables(Stack<Addable> addables) { |
| 87 | Arrays.fill(this.materialToAddable, DEFAULT_ADDABLE); |
no test coverage detected