MCPcopy Create free account
hub / github.com/Garten/sourcecraft / loadAddables

Method loadAddables

src/source/addable/AddableManager.java:65–84  ·  view source on GitHub ↗
(String[] addablesString)

Source from the content-addressed store, hash-verified

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);

Callers 1

AddableManagerMethod · 0.95

Calls 4

logMethod · 0.95
equalsMethod · 0.45
getNameMethod · 0.45
getInstancesMethod · 0.45

Tested by

no test coverage detected