MplProgramPlacer extends MplChainPlacer { @Override public List<CommandBlockChain> place() throws NotEnoughSpaceException { List<CommandChain> chains = new ArrayList<>(container.getChains()); chains.sort((o1, o2) -> { return Integer.compare(o1.getCommands().size(), o2.getCommands().size()) * -1; }); while (true) { this.chains.clear(); try { for (CommandChain chain : chains) { addChain(chain); } addUnInstall(); break; } catch (NotEnoughSpaceException ex) { increaseSize(); continue; } } return this.chains; } MplProgramPlacer(ChainContainer container, MinecraftVersion version,
      CompilerOptions options); @Override List<CommandBlockChain> place();  }
@Test public void test_when_using_normal_Mode_Prozess_MarkerEntities_are_at_the_top_of_each_block() throws Exception { MinecraftVersion version = MinecraftVersion._15w35a; CompilerOptions options = new CompilerOptions(); ChainContainer container = some($ChainContainer(options) .withOrientation(new Orientation3D()) .withChains(listOf(some($CommandChain(options))))); List<CommandBlockChain> placed = createPlacer(version, options, container).place(); CommandBlockChain install = findByName("install", placed); List<MplBlock> blocks = install.getBlocks(); assertThat(blocks).hasSize(3); CommandBlock block = (CommandBlock) blocks.get(1); assertThat(block.getCommand()) .startsWith("summon " + version.markerEntity() + " ${origin + (0 0.4 1)}"); }