use of am2.api.blocks.MultiblockStructureDefinition.BlockCoord in project ArsMagica2 by Mithion.
the class GuiArcaneCompendium method getMultiblockLayer.
private TreeMap<BlockCoord, ArrayList<BlockDec>> getMultiblockLayer(int layer) {
TreeMap<BlockCoord, ArrayList<BlockDec>> layerBlocksSorted = new TreeMap<BlockCoord, ArrayList<BlockDec>>();
for (int mutex : entryMultiblock.getMutexList()) {
ArrayList<StructureGroup> groups = entryMultiblock.getGroupsForMutex(mutex);
StructureGroup selected = groups.get(AMGuiHelper.instance.getSlowTicker() % groups.size());
HashMap<BlockCoord, ArrayList<BlockDec>> layerBlocks = entryMultiblock.getStructureLayer(selected, layer);
for (BlockCoord bc : layerBlocks.keySet()) {
layerBlocksSorted.put(bc, layerBlocks.get(bc));
}
}
return layerBlocksSorted;
}
Aggregations