This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1>What is Spout?</h1> | |
| <h2>Platform</h2> | |
| Spout is an open source, multithreaded, voxel game engine and platform, written in Java. The Spout Platform allows developers to create games, or lightweight plugins that modify existing features, seamlessly sharing content and features from the server to Spout clients. You may here Spout be called "next-gen" or "Platform" in order to distinguish it from Spoutcraft and SpoutPlugin, Legacy projects. If you'd like to check out the source, you can do so on our main <a href="https://github.com/spoutdev" target="_blank">GitHub</a>. | |
| <br /> | |
| <h2>Vanilla</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (dynamicPacketMap.getKeys().contains(clazz.getName())) { | |
| // Already bound, just return | |
| return dynamicPacketMap.register(clazz.getName()); | |
| } | |
| if (dynamicId) { | |
| int id; | |
| do { | |
| id = nextId.getAndIncrement(); | |
| } while (find(prevNewId) != null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ExecutorService threads = Executors.newCachedThreadPool(); | |
| for (final T elem : elements) { | |
| threads.submit(new Runnable() { | |
| @Override | |
| public void run() { | |
| operation.invoke(elem); | |
| } | |
| }); | |
| } |