for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo;
@@ -80,7 +77,7 @@ public interface World extends AreaRegionAccess, Named, ComponentOwner {
/**
* Spawns an {@link Entity} at the {@link Point} blueprinted with the {@link EntityPrefab} provided.
- * The {@link LoadOption} parameter is used to tell Spout if it should load or not load the region for the point provided.
+ * The {@link LoadOption} parameter is used to tell Flow if it should load or not load the region for the point provided.
* If the region is not loaded currently, or it isn't loaded as specified by the {@link LoadOption}, then this may return null and the entity may not be spawned.
*
* @param point The area in space to spawn
diff --git a/src/main/java/com/flowpowered/api/geo/WorldManager.java b/src/main/java/com/flowpowered/api/geo/WorldManager.java
index 39fadef..d51a579 100644
--- a/src/main/java/com/flowpowered/api/geo/WorldManager.java
+++ b/src/main/java/com/flowpowered/api/geo/WorldManager.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.api.geo;
import java.util.Collection;
diff --git a/src/main/java/com/flowpowered/api/geo/WorldSource.java b/src/main/java/com/flowpowered/api/geo/WorldSource.java
index 9c914a0..be41772 100644
--- a/src/main/java/com/flowpowered/api/geo/WorldSource.java
+++ b/src/main/java/com/flowpowered/api/geo/WorldSource.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/Block.java b/src/main/java/com/flowpowered/api/geo/cuboid/Block.java
index 3cef545..26222d0 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/Block.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/Block.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/BlockComponentContainer.java b/src/main/java/com/flowpowered/api/geo/cuboid/BlockComponentContainer.java
index e9a3438..e2cfca3 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/BlockComponentContainer.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/BlockComponentContainer.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/BlockContainer.java b/src/main/java/com/flowpowered/api/geo/cuboid/BlockContainer.java
index 96dc4e2..aa6ea41 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/BlockContainer.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/BlockContainer.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/Chunk.java b/src/main/java/com/flowpowered/api/geo/cuboid/Chunk.java
index 016f4e8..fbc2f37 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/Chunk.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/Chunk.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/ChunkSnapshot.java b/src/main/java/com/flowpowered/api/geo/cuboid/ChunkSnapshot.java
index 9130f1b..6c2794f 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/ChunkSnapshot.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/ChunkSnapshot.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/ChunkSnapshotGroup.java b/src/main/java/com/flowpowered/api/geo/cuboid/ChunkSnapshotGroup.java
index cc17ab6..a372604 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/ChunkSnapshotGroup.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/ChunkSnapshotGroup.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/ContainerFillOrder.java b/src/main/java/com/flowpowered/api/geo/cuboid/ContainerFillOrder.java
index 3df5354..58ee6bd 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/ContainerFillOrder.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/ContainerFillOrder.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/Cube.java b/src/main/java/com/flowpowered/api/geo/cuboid/Cube.java
index 1acf7d9..cbd878e 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/Cube.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/Cube.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/CubicContainer.java b/src/main/java/com/flowpowered/api/geo/cuboid/CubicContainer.java
index 81adf61..acd2027 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/CubicContainer.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/CubicContainer.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/Cuboid.java b/src/main/java/com/flowpowered/api/geo/cuboid/Cuboid.java
index 5f3be69..0ce8e8b 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/Cuboid.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/Cuboid.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/Region.java b/src/main/java/com/flowpowered/api/geo/cuboid/Region.java
index 70d964b..be50239 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/Region.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/Region.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/UpdateOption.java b/src/main/java/com/flowpowered/api/geo/cuboid/UpdateOption.java
index 7dd43a1..80903aa 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/UpdateOption.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/UpdateOption.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/Voxel.java b/src/main/java/com/flowpowered/api/geo/cuboid/Voxel.java
index 4ec4d20..4c626f7 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/Voxel.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/Voxel.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/reference/ChunkReference.java b/src/main/java/com/flowpowered/api/geo/cuboid/reference/ChunkReference.java
index 2fd943f..6d8715e 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/reference/ChunkReference.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/reference/ChunkReference.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid.reference;
diff --git a/src/main/java/com/flowpowered/api/geo/cuboid/reference/RegionReference.java b/src/main/java/com/flowpowered/api/geo/cuboid/reference/RegionReference.java
index ea49932..cba0f8c 100644
--- a/src/main/java/com/flowpowered/api/geo/cuboid/reference/RegionReference.java
+++ b/src/main/java/com/flowpowered/api/geo/cuboid/reference/RegionReference.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.cuboid.reference;
diff --git a/src/main/java/com/flowpowered/api/geo/discrete/Point.java b/src/main/java/com/flowpowered/api/geo/discrete/Point.java
index 7b6551f..3766ac2 100644
--- a/src/main/java/com/flowpowered/api/geo/discrete/Point.java
+++ b/src/main/java/com/flowpowered/api/geo/discrete/Point.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.discrete;
@@ -32,7 +29,7 @@
import com.flowpowered.commons.StringUtil;
import org.apache.commons.lang3.builder.HashCodeBuilder;
-import com.flowpowered.api.Spout;
+import com.flowpowered.api.Flow;
import com.flowpowered.api.geo.LoadOption;
import com.flowpowered.api.geo.World;
@@ -312,7 +309,7 @@ private void readObject(java.io.ObjectInputStream in) throws IOException {
float y = in.readFloat();
float z = in.readFloat();
String world = in.readUTF();
- World w = Spout.getEngine().getWorldManager().getWorld(world, true);
+ World w = Flow.getEngine().getWorldManager().getWorld(world, true);
try {
Field field;
@@ -332,7 +329,7 @@ private void readObject(java.io.ObjectInputStream in) throws IOException {
field.setAccessible(true);
field.set(this, w);
} catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) {
- if (Spout.debugMode()) {
+ if (Flow.debugMode()) {
e.printStackTrace();
}
}
diff --git a/src/main/java/com/flowpowered/api/geo/discrete/Transform.java b/src/main/java/com/flowpowered/api/geo/discrete/Transform.java
index 1e06019..7af3480 100644
--- a/src/main/java/com/flowpowered/api/geo/discrete/Transform.java
+++ b/src/main/java/com/flowpowered/api/geo/discrete/Transform.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.discrete;
diff --git a/src/main/java/com/flowpowered/api/geo/discrete/Transform2D.java b/src/main/java/com/flowpowered/api/geo/discrete/Transform2D.java
index f85c3cf..6564eeb 100644
--- a/src/main/java/com/flowpowered/api/geo/discrete/Transform2D.java
+++ b/src/main/java/com/flowpowered/api/geo/discrete/Transform2D.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.geo.discrete;
diff --git a/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAClosedException.java b/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAClosedException.java
index e0d9e4f..036c93b 100644
--- a/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAClosedException.java
+++ b/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAClosedException.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.bytearrayarray;
diff --git a/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAException.java b/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAException.java
index e3532b9..23fdea0 100644
--- a/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAException.java
+++ b/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAException.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.bytearrayarray;
diff --git a/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAOpenInProgress.java b/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAOpenInProgress.java
index 7f95d82..1a33b04 100644
--- a/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAOpenInProgress.java
+++ b/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAOpenInProgress.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.bytearrayarray;
diff --git a/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAWrapper.java b/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAWrapper.java
index a0fd64f..9d3bd92 100644
--- a/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAWrapper.java
+++ b/src/main/java/com/flowpowered/api/io/bytearrayarray/BAAWrapper.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.bytearrayarray;
diff --git a/src/main/java/com/flowpowered/api/io/bytearrayarray/ByteArrayArray.java b/src/main/java/com/flowpowered/api/io/bytearrayarray/ByteArrayArray.java
index 11ce50b..d99577b 100644
--- a/src/main/java/com/flowpowered/api/io/bytearrayarray/ByteArrayArray.java
+++ b/src/main/java/com/flowpowered/api/io/bytearrayarray/ByteArrayArray.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.bytearrayarray;
diff --git a/src/main/java/com/flowpowered/api/io/nbt/QuaternionTag.java b/src/main/java/com/flowpowered/api/io/nbt/QuaternionTag.java
index 1cd195f..96e2211 100644
--- a/src/main/java/com/flowpowered/api/io/nbt/QuaternionTag.java
+++ b/src/main/java/com/flowpowered/api/io/nbt/QuaternionTag.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.nbt;
diff --git a/src/main/java/com/flowpowered/api/io/nbt/TransformTag.java b/src/main/java/com/flowpowered/api/io/nbt/TransformTag.java
index 59276a7..59dc3a2 100644
--- a/src/main/java/com/flowpowered/api/io/nbt/TransformTag.java
+++ b/src/main/java/com/flowpowered/api/io/nbt/TransformTag.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.nbt;
diff --git a/src/main/java/com/flowpowered/api/io/nbt/UUIDTag.java b/src/main/java/com/flowpowered/api/io/nbt/UUIDTag.java
index c1dfd15..1b53075 100644
--- a/src/main/java/com/flowpowered/api/io/nbt/UUIDTag.java
+++ b/src/main/java/com/flowpowered/api/io/nbt/UUIDTag.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.nbt;
diff --git a/src/main/java/com/flowpowered/api/io/nbt/Vector3Tag.java b/src/main/java/com/flowpowered/api/io/nbt/Vector3Tag.java
index 6b27699..7e1c608 100644
--- a/src/main/java/com/flowpowered/api/io/nbt/Vector3Tag.java
+++ b/src/main/java/com/flowpowered/api/io/nbt/Vector3Tag.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.nbt;
diff --git a/src/main/java/com/flowpowered/api/io/regionfile/CachedRandomAccessFile.java b/src/main/java/com/flowpowered/api/io/regionfile/CachedRandomAccessFile.java
index c510254..dd870e6 100644
--- a/src/main/java/com/flowpowered/api/io/regionfile/CachedRandomAccessFile.java
+++ b/src/main/java/com/flowpowered/api/io/regionfile/CachedRandomAccessFile.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.regionfile;
diff --git a/src/main/java/com/flowpowered/api/io/regionfile/MappedRandomAccessFile.java b/src/main/java/com/flowpowered/api/io/regionfile/MappedRandomAccessFile.java
index dec1ef8..e1a1d76 100644
--- a/src/main/java/com/flowpowered/api/io/regionfile/MappedRandomAccessFile.java
+++ b/src/main/java/com/flowpowered/api/io/regionfile/MappedRandomAccessFile.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.regionfile;
diff --git a/src/main/java/com/flowpowered/api/io/regionfile/SRFBlockLock.java b/src/main/java/com/flowpowered/api/io/regionfile/SRFBlockLock.java
index f4a820d..324b39a 100644
--- a/src/main/java/com/flowpowered/api/io/regionfile/SRFBlockLock.java
+++ b/src/main/java/com/flowpowered/api/io/regionfile/SRFBlockLock.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.regionfile;
diff --git a/src/main/java/com/flowpowered/api/io/regionfile/SRFClosedException.java b/src/main/java/com/flowpowered/api/io/regionfile/SRFClosedException.java
index 8fa0155..19891f3 100644
--- a/src/main/java/com/flowpowered/api/io/regionfile/SRFClosedException.java
+++ b/src/main/java/com/flowpowered/api/io/regionfile/SRFClosedException.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.regionfile;
diff --git a/src/main/java/com/flowpowered/api/io/regionfile/SRFException.java b/src/main/java/com/flowpowered/api/io/regionfile/SRFException.java
index 0527f44..2b6e1a0 100644
--- a/src/main/java/com/flowpowered/api/io/regionfile/SRFException.java
+++ b/src/main/java/com/flowpowered/api/io/regionfile/SRFException.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.regionfile;
diff --git a/src/main/java/com/flowpowered/api/io/regionfile/SRFOutputStream.java b/src/main/java/com/flowpowered/api/io/regionfile/SRFOutputStream.java
index 8047a95..7f4db1b 100644
--- a/src/main/java/com/flowpowered/api/io/regionfile/SRFOutputStream.java
+++ b/src/main/java/com/flowpowered/api/io/regionfile/SRFOutputStream.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.regionfile;
diff --git a/src/main/java/com/flowpowered/api/io/regionfile/SRFReentrantReadWriteLock.java b/src/main/java/com/flowpowered/api/io/regionfile/SRFReentrantReadWriteLock.java
index 44f5986..ac1dd55 100644
--- a/src/main/java/com/flowpowered/api/io/regionfile/SRFReentrantReadWriteLock.java
+++ b/src/main/java/com/flowpowered/api/io/regionfile/SRFReentrantReadWriteLock.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.regionfile;
diff --git a/src/main/java/com/flowpowered/api/io/regionfile/SimpleRegionFile.java b/src/main/java/com/flowpowered/api/io/regionfile/SimpleRegionFile.java
index ea91274..700c3bf 100644
--- a/src/main/java/com/flowpowered/api/io/regionfile/SimpleRegionFile.java
+++ b/src/main/java/com/flowpowered/api/io/regionfile/SimpleRegionFile.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.io.regionfile;
diff --git a/src/main/java/com/flowpowered/api/material/BlockMaterial.java b/src/main/java/com/flowpowered/api/material/BlockMaterial.java
index 1c22541..6493b0b 100644
--- a/src/main/java/com/flowpowered/api/material/BlockMaterial.java
+++ b/src/main/java/com/flowpowered/api/material/BlockMaterial.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.material;
diff --git a/src/main/java/com/flowpowered/api/material/Material.java b/src/main/java/com/flowpowered/api/material/Material.java
index c270d5d..2de1965 100644
--- a/src/main/java/com/flowpowered/api/material/Material.java
+++ b/src/main/java/com/flowpowered/api/material/Material.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.material;
diff --git a/src/main/java/com/flowpowered/api/material/MaterialRegistry.java b/src/main/java/com/flowpowered/api/material/MaterialRegistry.java
index b52554e..5ac9c73 100644
--- a/src/main/java/com/flowpowered/api/material/MaterialRegistry.java
+++ b/src/main/java/com/flowpowered/api/material/MaterialRegistry.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.material;
@@ -32,7 +29,7 @@
import java.util.concurrent.atomic.AtomicReference;
import com.flowpowered.api.Server;
-import com.flowpowered.api.Spout;
+import com.flowpowered.api.Flow;
import com.flowpowered.api.material.block.BlockFullState;
import com.flowpowered.api.util.SyncedStringMap;
import com.flowpowered.commons.store.BinaryFileStore;
@@ -69,7 +66,7 @@ public static SyncedStringMap setupRegistry() {
if (setup) {
throw new IllegalStateException("Can not setup material registry twice!");
}
- if (Spout.getPlatform().isServer()) {
+ if (Flow.getPlatform().isServer()) {
setupServer();
} else {
setupClient();
@@ -80,7 +77,7 @@ public static SyncedStringMap setupRegistry() {
}
private static void setupServer() {
- File serverItemMap = new File(((Server) Spout.getEngine()).getWorldManager().getWorldFolder(), "materials.dat");
+ File serverItemMap = new File(((Server) Flow.getEngine()).getWorldManager().getWorldFolder(), "materials.dat");
BinaryFileStore store = new BinaryFileStore(serverItemMap);
materialRegistry = SyncedStringMap.create(null, store, 1, Short.MAX_VALUE, Material.class.getName());
if (serverItemMap.exists()) {
diff --git a/src/main/java/com/flowpowered/api/material/Placeable.java b/src/main/java/com/flowpowered/api/material/Placeable.java
index 84a4121..7807e11 100644
--- a/src/main/java/com/flowpowered/api/material/Placeable.java
+++ b/src/main/java/com/flowpowered/api/material/Placeable.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.material;
diff --git a/src/main/java/com/flowpowered/api/material/basic/Air.java b/src/main/java/com/flowpowered/api/material/basic/Air.java
index 55a95af..a8c4b1b 100644
--- a/src/main/java/com/flowpowered/api/material/basic/Air.java
+++ b/src/main/java/com/flowpowered/api/material/basic/Air.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.material.basic;
diff --git a/src/main/java/com/flowpowered/api/material/basic/Solid.java b/src/main/java/com/flowpowered/api/material/basic/Solid.java
index 275e627..b00c8cd 100644
--- a/src/main/java/com/flowpowered/api/material/basic/Solid.java
+++ b/src/main/java/com/flowpowered/api/material/basic/Solid.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.material.basic;
diff --git a/src/main/java/com/flowpowered/api/material/block/BlockFace.java b/src/main/java/com/flowpowered/api/material/block/BlockFace.java
index 956281d..07a9eec 100644
--- a/src/main/java/com/flowpowered/api/material/block/BlockFace.java
+++ b/src/main/java/com/flowpowered/api/material/block/BlockFace.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.material.block;
diff --git a/src/main/java/com/flowpowered/api/material/block/BlockFaces.java b/src/main/java/com/flowpowered/api/material/block/BlockFaces.java
index 9be481f..77703f3 100644
--- a/src/main/java/com/flowpowered/api/material/block/BlockFaces.java
+++ b/src/main/java/com/flowpowered/api/material/block/BlockFaces.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.material.block;
diff --git a/src/main/java/com/flowpowered/api/material/block/BlockFullState.java b/src/main/java/com/flowpowered/api/material/block/BlockFullState.java
index 1e2dcde..0ca0736 100644
--- a/src/main/java/com/flowpowered/api/material/block/BlockFullState.java
+++ b/src/main/java/com/flowpowered/api/material/block/BlockFullState.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.material.block;
diff --git a/src/main/java/com/flowpowered/api/material/block/BlockSnapshot.java b/src/main/java/com/flowpowered/api/material/block/BlockSnapshot.java
index 315613b..73d6fad 100644
--- a/src/main/java/com/flowpowered/api/material/block/BlockSnapshot.java
+++ b/src/main/java/com/flowpowered/api/material/block/BlockSnapshot.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.material.block;
diff --git a/src/main/java/com/flowpowered/api/model/mesh/Mesh.java b/src/main/java/com/flowpowered/api/model/mesh/Mesh.java
index 377ea90..4c2562c 100644
--- a/src/main/java/com/flowpowered/api/model/mesh/Mesh.java
+++ b/src/main/java/com/flowpowered/api/model/mesh/Mesh.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -38,10 +38,10 @@
import org.spout.renderer.api.util.CausticUtil;
/**
- * Represents a standard mesh, with various attributes (positions, normals, texture coordinates and/or tangents). This mesh can be converted into {@link org.spout.renderer.data.VertexData for
+ * Represents a standard mesh, with various attributes (positions, normals, texture coordinates and/or tangents). This mesh can be converted into {@link VertexData for
* rendering}.
*
- * @see org.spoutcraft.client.nterface.mesh.Mesh.MeshAttribute
+ * @see MeshAttribute
*/
public class Mesh {
private final Map attributes = new EnumMap<>(MeshAttribute.class);
@@ -123,8 +123,8 @@ public boolean isEmpty() {
}
/**
- * Builds the mesh into a {@link org.spout.renderer.data.VertexData} to be ready for rendering. If an attribute has no data, but can be automatically generated (see {@link
- * org.spoutcraft.client.nterface.mesh.Mesh.MeshAttribute#generateDataIfMissing()}, it will be generated for the build. The generated data will be stored in the attribute float list.
+ * Builds the mesh into a {@link VertexData} to be ready for rendering. If an attribute has no data, but can be automatically generated
+ * (@see MeshAttribute#generateDataIfMissing()), it will be generated for the build. The generated data will be stored in the attribute float list.
*
* @return The vertex data for the built mesh
*/
diff --git a/src/main/java/com/flowpowered/api/model/mesher/ChunkMesher.java b/src/main/java/com/flowpowered/api/model/mesher/ChunkMesher.java
index 651d75e..2d1f107 100644
--- a/src/main/java/com/flowpowered/api/model/mesher/ChunkMesher.java
+++ b/src/main/java/com/flowpowered/api/model/mesher/ChunkMesher.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/src/main/java/com/flowpowered/api/render/Renderer.java b/src/main/java/com/flowpowered/api/render/Renderer.java
index b1d85b4..8d91f66 100644
--- a/src/main/java/com/flowpowered/api/render/Renderer.java
+++ b/src/main/java/com/flowpowered/api/render/Renderer.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.api.render;
import com.flowpowered.math.vector.Vector2f;
diff --git a/src/main/java/com/flowpowered/api/scheduler/IllegalTickSequenceException.java b/src/main/java/com/flowpowered/api/scheduler/IllegalTickSequenceException.java
index c8cf086..916defa 100644
--- a/src/main/java/com/flowpowered/api/scheduler/IllegalTickSequenceException.java
+++ b/src/main/java/com/flowpowered/api/scheduler/IllegalTickSequenceException.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.scheduler;
diff --git a/src/main/java/com/flowpowered/api/scheduler/Scheduler.java b/src/main/java/com/flowpowered/api/scheduler/Scheduler.java
index 93ffcf4..603815d 100644
--- a/src/main/java/com/flowpowered/api/scheduler/Scheduler.java
+++ b/src/main/java/com/flowpowered/api/scheduler/Scheduler.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.scheduler;
diff --git a/src/main/java/com/flowpowered/api/scheduler/Snapshot.java b/src/main/java/com/flowpowered/api/scheduler/Snapshot.java
index b1bb096..d194d0c 100644
--- a/src/main/java/com/flowpowered/api/scheduler/Snapshot.java
+++ b/src/main/java/com/flowpowered/api/scheduler/Snapshot.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.api.scheduler;
public interface Snapshot {
diff --git a/src/main/java/com/flowpowered/api/scheduler/Task.java b/src/main/java/com/flowpowered/api/scheduler/Task.java
index f814151..0c29a8c 100644
--- a/src/main/java/com/flowpowered/api/scheduler/Task.java
+++ b/src/main/java/com/flowpowered/api/scheduler/Task.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.scheduler;
diff --git a/src/main/java/com/flowpowered/api/scheduler/TaskManager.java b/src/main/java/com/flowpowered/api/scheduler/TaskManager.java
index 75b4eb3..48fb53d 100644
--- a/src/main/java/com/flowpowered/api/scheduler/TaskManager.java
+++ b/src/main/java/com/flowpowered/api/scheduler/TaskManager.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.scheduler;
diff --git a/src/main/java/com/flowpowered/api/scheduler/TaskPriority.java b/src/main/java/com/flowpowered/api/scheduler/TaskPriority.java
index eeaf52b..632f086 100644
--- a/src/main/java/com/flowpowered/api/scheduler/TaskPriority.java
+++ b/src/main/java/com/flowpowered/api/scheduler/TaskPriority.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.scheduler;
diff --git a/src/main/java/com/flowpowered/api/scheduler/TickStage.java b/src/main/java/com/flowpowered/api/scheduler/TickStage.java
index b2eae65..9db1f94 100644
--- a/src/main/java/com/flowpowered/api/scheduler/TickStage.java
+++ b/src/main/java/com/flowpowered/api/scheduler/TickStage.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.scheduler;
diff --git a/src/main/java/com/flowpowered/api/scheduler/Timer.java b/src/main/java/com/flowpowered/api/scheduler/Timer.java
index 678903b..4bbb94c 100644
--- a/src/main/java/com/flowpowered/api/scheduler/Timer.java
+++ b/src/main/java/com/flowpowered/api/scheduler/Timer.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/src/main/java/com/flowpowered/api/scheduler/Worker.java b/src/main/java/com/flowpowered/api/scheduler/Worker.java
index af73123..2b9704c 100644
--- a/src/main/java/com/flowpowered/api/scheduler/Worker.java
+++ b/src/main/java/com/flowpowered/api/scheduler/Worker.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.scheduler;
diff --git a/src/main/java/com/flowpowered/api/scheduler/tickable/BasicTickable.java b/src/main/java/com/flowpowered/api/scheduler/tickable/BasicTickable.java
index 8737396..82e8623 100644
--- a/src/main/java/com/flowpowered/api/scheduler/tickable/BasicTickable.java
+++ b/src/main/java/com/flowpowered/api/scheduler/tickable/BasicTickable.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.scheduler.tickable;
diff --git a/src/main/java/com/flowpowered/api/scheduler/tickable/TickPriority.java b/src/main/java/com/flowpowered/api/scheduler/tickable/TickPriority.java
index e9dbd4e..c28791d 100644
--- a/src/main/java/com/flowpowered/api/scheduler/tickable/TickPriority.java
+++ b/src/main/java/com/flowpowered/api/scheduler/tickable/TickPriority.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.scheduler.tickable;
diff --git a/src/main/java/com/flowpowered/api/scheduler/tickable/Tickable.java b/src/main/java/com/flowpowered/api/scheduler/tickable/Tickable.java
index 8bdc43e..15b12b8 100644
--- a/src/main/java/com/flowpowered/api/scheduler/tickable/Tickable.java
+++ b/src/main/java/com/flowpowered/api/scheduler/tickable/Tickable.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.scheduler.tickable;
diff --git a/src/main/java/com/flowpowered/api/util/SyncedMapEvent.java b/src/main/java/com/flowpowered/api/util/SyncedMapEvent.java
index d7d6b76..cc04cbd 100644
--- a/src/main/java/com/flowpowered/api/util/SyncedMapEvent.java
+++ b/src/main/java/com/flowpowered/api/util/SyncedMapEvent.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util;
diff --git a/src/main/java/com/flowpowered/api/util/SyncedMapRegistry.java b/src/main/java/com/flowpowered/api/util/SyncedMapRegistry.java
index ebb652c..440fe8a 100644
--- a/src/main/java/com/flowpowered/api/util/SyncedMapRegistry.java
+++ b/src/main/java/com/flowpowered/api/util/SyncedMapRegistry.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util;
diff --git a/src/main/java/com/flowpowered/api/util/SyncedStringMap.java b/src/main/java/com/flowpowered/api/util/SyncedStringMap.java
index fa59e3d..4c5a2b9 100644
--- a/src/main/java/com/flowpowered/api/util/SyncedStringMap.java
+++ b/src/main/java/com/flowpowered/api/util/SyncedStringMap.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util;
diff --git a/src/main/java/com/flowpowered/api/util/concurrent/ConcurrentLongPriorityQueue.java b/src/main/java/com/flowpowered/api/util/concurrent/ConcurrentLongPriorityQueue.java
index 5cb8f17..aa80bb5 100644
--- a/src/main/java/com/flowpowered/api/util/concurrent/ConcurrentLongPriorityQueue.java
+++ b/src/main/java/com/flowpowered/api/util/concurrent/ConcurrentLongPriorityQueue.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.concurrent;
diff --git a/src/main/java/com/flowpowered/api/util/concurrent/LongPrioritized.java b/src/main/java/com/flowpowered/api/util/concurrent/LongPrioritized.java
index 296a3b9..575ebad 100644
--- a/src/main/java/com/flowpowered/api/util/concurrent/LongPrioritized.java
+++ b/src/main/java/com/flowpowered/api/util/concurrent/LongPrioritized.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.concurrent;
diff --git a/src/main/java/com/flowpowered/api/util/concurrent/RedirectableConcurrentLinkedQueue.java b/src/main/java/com/flowpowered/api/util/concurrent/RedirectableConcurrentLinkedQueue.java
index 36c1765..2749c21 100644
--- a/src/main/java/com/flowpowered/api/util/concurrent/RedirectableConcurrentLinkedQueue.java
+++ b/src/main/java/com/flowpowered/api/util/concurrent/RedirectableConcurrentLinkedQueue.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.concurrent;
diff --git a/src/main/java/com/flowpowered/api/util/cuboid/CuboidBlockMaterialBuffer.java b/src/main/java/com/flowpowered/api/util/cuboid/CuboidBlockMaterialBuffer.java
index f116214..78769ea 100644
--- a/src/main/java/com/flowpowered/api/util/cuboid/CuboidBlockMaterialBuffer.java
+++ b/src/main/java/com/flowpowered/api/util/cuboid/CuboidBlockMaterialBuffer.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.cuboid;
diff --git a/src/main/java/com/flowpowered/api/util/cuboid/CuboidBuffer.java b/src/main/java/com/flowpowered/api/util/cuboid/CuboidBuffer.java
index be8959c..68fa2d6 100644
--- a/src/main/java/com/flowpowered/api/util/cuboid/CuboidBuffer.java
+++ b/src/main/java/com/flowpowered/api/util/cuboid/CuboidBuffer.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.cuboid;
diff --git a/src/main/java/com/flowpowered/api/util/cuboid/ImmutableCuboidBlockMaterialBuffer.java b/src/main/java/com/flowpowered/api/util/cuboid/ImmutableCuboidBlockMaterialBuffer.java
index 0baa272..8319a73 100644
--- a/src/main/java/com/flowpowered/api/util/cuboid/ImmutableCuboidBlockMaterialBuffer.java
+++ b/src/main/java/com/flowpowered/api/util/cuboid/ImmutableCuboidBlockMaterialBuffer.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.cuboid;
diff --git a/src/main/java/com/flowpowered/api/util/cuboid/procedure/CuboidBlockMaterialProcedure.java b/src/main/java/com/flowpowered/api/util/cuboid/procedure/CuboidBlockMaterialProcedure.java
index beb59d5..deda9de 100644
--- a/src/main/java/com/flowpowered/api/util/cuboid/procedure/CuboidBlockMaterialProcedure.java
+++ b/src/main/java/com/flowpowered/api/util/cuboid/procedure/CuboidBlockMaterialProcedure.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.cuboid.procedure;
diff --git a/src/main/java/com/flowpowered/api/util/thread/annotation/DelayedWrite.java b/src/main/java/com/flowpowered/api/util/thread/annotation/DelayedWrite.java
index 6e568c3..5644f5b 100644
--- a/src/main/java/com/flowpowered/api/util/thread/annotation/DelayedWrite.java
+++ b/src/main/java/com/flowpowered/api/util/thread/annotation/DelayedWrite.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.thread.annotation;
diff --git a/src/main/java/com/flowpowered/api/util/thread/annotation/LiveRead.java b/src/main/java/com/flowpowered/api/util/thread/annotation/LiveRead.java
index 46682fa..94e3b05 100644
--- a/src/main/java/com/flowpowered/api/util/thread/annotation/LiveRead.java
+++ b/src/main/java/com/flowpowered/api/util/thread/annotation/LiveRead.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.thread.annotation;
diff --git a/src/main/java/com/flowpowered/api/util/thread/annotation/LiveWrite.java b/src/main/java/com/flowpowered/api/util/thread/annotation/LiveWrite.java
index d151fd5..283c10d 100644
--- a/src/main/java/com/flowpowered/api/util/thread/annotation/LiveWrite.java
+++ b/src/main/java/com/flowpowered/api/util/thread/annotation/LiveWrite.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.thread.annotation;
diff --git a/src/main/java/com/flowpowered/api/util/thread/annotation/SnapshotRead.java b/src/main/java/com/flowpowered/api/util/thread/annotation/SnapshotRead.java
index df6c0af..3ddb866 100644
--- a/src/main/java/com/flowpowered/api/util/thread/annotation/SnapshotRead.java
+++ b/src/main/java/com/flowpowered/api/util/thread/annotation/SnapshotRead.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.thread.annotation;
diff --git a/src/main/java/com/flowpowered/api/util/thread/annotation/Threadsafe.java b/src/main/java/com/flowpowered/api/util/thread/annotation/Threadsafe.java
index 5b804b8..80bb03e 100644
--- a/src/main/java/com/flowpowered/api/util/thread/annotation/Threadsafe.java
+++ b/src/main/java/com/flowpowered/api/util/thread/annotation/Threadsafe.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.thread.annotation;
diff --git a/src/main/java/com/flowpowered/api/util/typechecker/TypeChecker.java b/src/main/java/com/flowpowered/api/util/typechecker/TypeChecker.java
index 2471f8e..0762a06 100644
--- a/src/main/java/com/flowpowered/api/util/typechecker/TypeChecker.java
+++ b/src/main/java/com/flowpowered/api/util/typechecker/TypeChecker.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.api.util.typechecker;
diff --git a/src/main/java/com/flowpowered/engine/FlowApplication.java b/src/main/java/com/flowpowered/engine/FlowApplication.java
new file mode 100644
index 0000000..2091878
--- /dev/null
+++ b/src/main/java/com/flowpowered/engine/FlowApplication.java
@@ -0,0 +1,81 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.flowpowered.engine;
+
+import java.io.File;
+
+import com.beust.jcommander.JCommander;
+import com.beust.jcommander.Parameter;
+
+import com.flowpowered.api.Platform;
+import com.flowpowered.api.Flow;
+import com.flowpowered.engine.util.argument.PlatformConverter;
+
+/**
+ * A main class for launching various platforms
+ */
+public class FlowApplication {
+ @Parameter (names = {"--platform", "-platform", "--p", "-p"}, converter = PlatformConverter.class)
+ public Platform platform = Platform.SINGLEPLAYER;
+ @Parameter (names = {"--debug", "-debug", "--d", "-d"}, description = "Debug Mode")
+ public boolean debug = false;
+ @Parameter (names = {"--protocol"}, description = "Protocol to connect with")
+ public String protocol = null;
+ @Parameter (names = {"--server"}, description = "Server to connect to")
+ public String server = null;
+ @Parameter (names = {"--port"}, description = "Port to connect to")
+ public int port = -1;
+ @Parameter (names = {"--user"}, description = "User to connect as")
+ public String user = null;
+
+ public static void main(String[] args) {
+ try {
+ FlowApplication main = new FlowApplication();
+ JCommander commands = new JCommander(main);
+ commands.parse(args);
+
+ FlowEngine engine;
+ switch (main.platform) {
+ case CLIENT:
+ engine = new FlowClient(main);
+ break;
+ case SERVER:
+ engine = new FlowServer(main);
+ break;
+ case SINGLEPLAYER:
+ engine = new FlowSingleplayer(main);
+ break;
+ default:
+ throw new IllegalArgumentException("Unknown platform: " + main.platform);
+ }
+
+ Flow.setEngine(engine);
+ engine.init();
+ engine.start();
+ } catch (Throwable t) {
+ t.printStackTrace();
+ Runtime.getRuntime().halt(1);
+ }
+ }
+}
diff --git a/src/main/java/com/flowpowered/engine/FlowClient.java b/src/main/java/com/flowpowered/engine/FlowClient.java
new file mode 100644
index 0000000..a0a230f
--- /dev/null
+++ b/src/main/java/com/flowpowered/engine/FlowClient.java
@@ -0,0 +1,72 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.flowpowered.engine;
+
+import java.util.concurrent.atomic.AtomicReference;
+import com.flowpowered.api.Client;
+import com.flowpowered.api.Platform;
+import com.flowpowered.api.entity.Player;
+import com.flowpowered.api.geo.World;
+import com.flowpowered.api.geo.WorldManager;
+import com.flowpowered.api.render.Renderer;
+import com.flowpowered.engine.entity.FlowPlayer;
+import com.flowpowered.engine.geo.world.FlowWorld;
+import com.flowpowered.engine.geo.world.FlowWorldManager;
+
+public class FlowClient extends FlowEngine implements Client {
+ private final AtomicReference player = new AtomicReference<>();
+ private final AtomicReference activeWorld = new AtomicReference<>();
+ private final FlowWorldManager worldManager;
+
+ public FlowClient(FlowApplication args) {
+ super(args);
+ this.worldManager = new FlowWorldManager<>(this);
+ }
+
+ @Override
+ public Platform getPlatform() {
+ return Platform.CLIENT;
+ }
+
+ @Override
+ public WorldManager getWorldManager() {
+ return worldManager;
+ }
+
+ @Override
+ public Player getPlayer() {
+ return player.get();
+ }
+
+ @Override
+ public World getWorld() {
+ return activeWorld.get();
+ }
+
+ @Override
+ public Renderer getRenderer() {
+ return getScheduler().getRenderThread().getRenderer();
+ }
+
+}
diff --git a/src/main/java/com/flowpowered/engine/FlowEngine.java b/src/main/java/com/flowpowered/engine/FlowEngine.java
new file mode 100644
index 0000000..99960cd
--- /dev/null
+++ b/src/main/java/com/flowpowered/engine/FlowEngine.java
@@ -0,0 +1,107 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.flowpowered.engine;
+
+import com.flowpowered.events.EventManager;
+import com.flowpowered.events.SimpleEventManager;
+
+import com.flowpowered.api.Engine;
+import com.flowpowered.api.material.MaterialRegistry;
+import com.flowpowered.api.util.SyncedStringMap;
+import com.flowpowered.engine.filesystem.FlowFileSystem;
+import com.flowpowered.engine.scheduler.FlowScheduler;
+import com.flowpowered.engine.util.thread.snapshotable.SnapshotManager;
+
+public abstract class FlowEngine implements Engine {
+ private final FlowApplication args;
+ private final EventManager eventManager;
+ private final FlowFileSystem fileSystem;
+
+ private FlowScheduler scheduler;
+ protected final SnapshotManager snapshotManager = new SnapshotManager();
+ private SyncedStringMap itemMap;
+
+
+ public FlowEngine(FlowApplication args) {
+ this.args = args;
+ this.eventManager = new SimpleEventManager();
+ this.fileSystem = new FlowFileSystem();
+ }
+
+ @Override
+ public String getVersion() {
+ return getClass().getPackage().getImplementationVersion();
+ }
+
+ public void init() {
+ itemMap = MaterialRegistry.setupRegistry();
+ scheduler = new FlowScheduler(this);
+ }
+
+ public void start() {
+ scheduler.startMainThread();
+ System.out.println("Engine started.");
+ }
+
+ @Override
+ public boolean stop() {
+ scheduler.stop();
+ System.out.println("Engine stopped");
+ return true;
+ }
+
+ @Override
+ public boolean stop(String reason) {
+ return stop();
+ }
+
+ @Override
+ public boolean debugMode() {
+ return args.debug;
+ }
+
+ @Override
+ public FlowScheduler getScheduler() {
+ return scheduler;
+ }
+
+ @Override
+ public FlowFileSystem getFileSystem() {
+ return fileSystem;
+ }
+
+ @Override
+ public EventManager getEventManager() {
+ return eventManager;
+ }
+
+ @Override
+ public String getName() {
+ return "Flow Engine";
+ }
+
+ public SnapshotManager getSnapshotManager() {
+ return snapshotManager;
+ }
+}
diff --git a/src/main/java/com/flowpowered/engine/FlowServer.java b/src/main/java/com/flowpowered/engine/FlowServer.java
new file mode 100644
index 0000000..44e6615
--- /dev/null
+++ b/src/main/java/com/flowpowered/engine/FlowServer.java
@@ -0,0 +1,101 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.flowpowered.engine;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+
+import com.flowpowered.commons.StringUtil;
+
+import com.flowpowered.api.Platform;
+import com.flowpowered.api.Server;
+import com.flowpowered.api.entity.Player;
+import com.flowpowered.engine.entity.FlowPlayer;
+import com.flowpowered.engine.geo.world.FlowServerWorldManager;
+import com.flowpowered.engine.util.thread.snapshotable.SnapshotableLinkedHashMap;
+
+public class FlowServer extends FlowEngine implements Server {
+ protected final SnapshotableLinkedHashMap players;
+ private final FlowServerWorldManager worldManager;
+
+ public FlowServer(FlowApplication args) {
+ super(args);
+ players = new SnapshotableLinkedHashMap<>(snapshotManager);
+ worldManager = new FlowServerWorldManager(this);
+ }
+
+ @Override
+ public Platform getPlatform() {
+ return Platform.SERVER;
+ }
+
+ @Override
+ public Collection getOnlinePlayers() {
+ Map playerList = players.get();
+ ArrayList onlinePlayers = new ArrayList<>(playerList.size());
+ for (FlowPlayer player : playerList.values()) {
+ if (player.isOnline()) {
+ onlinePlayers.add(player);
+ }
+ }
+ return onlinePlayers;
+ }
+
+ @Override
+ public int getMaxPlayers() {
+ // TODO: config
+ return 5;
+ }
+
+ @Override
+ public void broadcastMessage(String message) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void broadcastMessage(String permission, String message) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Player getPlayer(String name, boolean exact) {
+ name = name.toLowerCase();
+ if (exact) {
+ for (Player player : players.getValues()) {
+ if (player.getName().equalsIgnoreCase(name)) {
+ return player;
+ }
+ }
+ return null;
+ } else {
+ return StringUtil.getShortest(StringUtil.matchName(players.getValues(), name));
+ }
+ }
+
+ @Override
+ public FlowServerWorldManager getWorldManager() {
+ return worldManager;
+ }
+}
diff --git a/src/main/java/com/flowpowered/engine/FlowSingleplayer.java b/src/main/java/com/flowpowered/engine/FlowSingleplayer.java
new file mode 100644
index 0000000..77a0bbd
--- /dev/null
+++ b/src/main/java/com/flowpowered/engine/FlowSingleplayer.java
@@ -0,0 +1,110 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.flowpowered.engine;
+
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import com.flowpowered.api.Platform;
+import com.flowpowered.api.Singleplayer;
+import com.flowpowered.api.entity.Entity;
+import com.flowpowered.api.entity.Player;
+import com.flowpowered.api.geo.LoadOption;
+import com.flowpowered.api.geo.World;
+import com.flowpowered.api.generator.FlatWorldGenerator;
+import com.flowpowered.api.material.BlockMaterial;
+import com.flowpowered.engine.entity.FlowPlayer;
+import com.flowpowered.engine.geo.world.FlowWorld;
+import com.flowpowered.engine.render.DeployNatives;
+import com.flowpowered.engine.render.FlowRenderer;
+
+import com.flowpowered.math.vector.Vector3f;
+
+public class FlowSingleplayer extends FlowServer implements Singleplayer {
+ private final AtomicReference player = new AtomicReference<>();
+ private final AtomicReference activeWorld = new AtomicReference<>();
+
+ // TEST CODE
+ private Entity testEntity;
+
+ public FlowSingleplayer(FlowApplication args) {
+ super(args);
+ }
+
+ @Override
+ public void init() {
+ try {
+ DeployNatives.deploy();
+ } catch (Exception ex) {
+ Logger.getLogger(FlowSingleplayer.class.getName()).log(Level.SEVERE, null, ex);
+ return;
+ }
+ super.init();
+ FlowWorld loadedWorld = getWorldManager().loadWorld("fallback", new FlatWorldGenerator(BlockMaterial.SOLID_BLUE));
+ activeWorld.set(loadedWorld);
+ FlowPlayer player = new FlowPlayer("Flowy");
+ this.player.set(player);
+ players.put(player.getName(), player);
+ Entity entity = loadedWorld.spawnEntity(Vector3f.ZERO, LoadOption.LOAD_GEN);
+ this.testEntity = entity;
+ }
+
+ public Entity getTestEntity() {
+ return testEntity;
+ }
+
+ @Override
+ public void start() {
+ getScheduler().startClientThreads();
+ super.start();
+ }
+
+ @Override
+ public boolean stop() {
+ return super.stop();
+
+ }
+
+ @Override
+ public Platform getPlatform() {
+ return Platform.SINGLEPLAYER;
+ }
+
+ @Override
+ public Player getPlayer() {
+ return player.get();
+ }
+
+ @Override
+ public World getWorld() {
+ return activeWorld.get();
+ }
+
+ @Override
+ public FlowRenderer getRenderer() {
+ return getScheduler().getRenderThread().getRenderer();
+ }
+
+}
diff --git a/src/main/java/com/flowpowered/engine/SpoutApplication.java b/src/main/java/com/flowpowered/engine/SpoutApplication.java
deleted file mode 100644
index 50e1c2d..0000000
--- a/src/main/java/com/flowpowered/engine/SpoutApplication.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * This file is part of Spout.
- *
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
- *
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
- *
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
- *
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
- */
-package com.flowpowered.engine;
-
-import java.io.File;
-
-import com.beust.jcommander.JCommander;
-import com.beust.jcommander.Parameter;
-
-import com.flowpowered.api.Platform;
-import com.flowpowered.api.Spout;
-import com.flowpowered.engine.util.argument.PlatformConverter;
-
-/**
- * A main class for launching various platforms
- */
-public class SpoutApplication {
- @Parameter (names = {"--platform", "-platform", "--p", "-p"}, converter = PlatformConverter.class)
- public Platform platform = Platform.SINGLEPLAYER;
- @Parameter (names = {"--debug", "-debug", "--d", "-d"}, description = "Debug Mode")
- public boolean debug = false;
- @Parameter (names = {"--ccoverride"}, description = "Override ARB_CREATE_CONTEXT for the client")
- public boolean ccoverride = false;
- @Parameter (names = {"--path"}, description = "Override path for the client")
- public String path = null;
- @Parameter (names = {"--protocol"}, description = "Protocol to connect with")
- public String protocol = null;
- @Parameter (names = {"--server"}, description = "Server to connect to")
- public String server = null;
- @Parameter (names = {"--port"}, description = "Port to connect to")
- public int port = -1;
- @Parameter (names = {"--user"}, description = "User to connect as")
- public String user = null;
-
- public static void main(String[] args) {
- try {
- SpoutApplication main = new SpoutApplication();
- JCommander commands = new JCommander(main);
- commands.parse(args);
- if (main.path != null) {
- File dir = new File(main.path);
- if (!dir.exists()) {
- dir.mkdirs();
- }
- }
-
- SpoutEngine engine;
- switch (main.platform) {
- case CLIENT:
- engine = new SpoutClient(main);
- break;
- case SERVER:
- engine = new SpoutServer(main);
- break;
- case SINGLEPLAYER:
- engine = new SpoutSingleplayer(main);
- break;
- default:
- throw new IllegalArgumentException("Unknown platform: " + main.platform);
- }
-
- Spout.setEngine(engine);
- engine.init();
- engine.start();
- } catch (Throwable t) {
- t.printStackTrace();
- Runtime.getRuntime().halt(1);
- }
- }
-}
diff --git a/src/main/java/com/flowpowered/engine/SpoutClient.java b/src/main/java/com/flowpowered/engine/SpoutClient.java
deleted file mode 100644
index b21ada2..0000000
--- a/src/main/java/com/flowpowered/engine/SpoutClient.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.flowpowered.engine;
-
-import java.util.concurrent.atomic.AtomicReference;
-import com.flowpowered.api.Client;
-import com.flowpowered.api.Platform;
-import com.flowpowered.api.entity.Player;
-import com.flowpowered.api.geo.World;
-import com.flowpowered.api.geo.WorldManager;
-import com.flowpowered.api.render.Renderer;
-import com.flowpowered.engine.entity.SpoutPlayer;
-import com.flowpowered.engine.geo.world.SpoutWorld;
-import com.flowpowered.engine.geo.world.SpoutWorldManager;
-
-public class SpoutClient extends SpoutEngine implements Client {
- private final AtomicReference player = new AtomicReference<>();
- private final AtomicReference activeWorld = new AtomicReference<>();
- private final SpoutWorldManager worldManager;
-
- public SpoutClient(SpoutApplication args) {
- super(args);
- this.worldManager = new SpoutWorldManager(this);
- }
-
- @Override
- public Platform getPlatform() {
- return Platform.CLIENT;
- }
-
- @Override
- public WorldManager getWorldManager() {
- return worldManager;
- }
-
- @Override
- public Player getPlayer() {
- return player.get();
- }
-
- @Override
- public World getWorld() {
- return activeWorld.get();
- }
-
- @Override
- public Renderer getRenderer() {
- return getScheduler().getRenderThread().getRenderer();
- }
-
-}
diff --git a/src/main/java/com/flowpowered/engine/SpoutEngine.java b/src/main/java/com/flowpowered/engine/SpoutEngine.java
deleted file mode 100644
index cccc35c..0000000
--- a/src/main/java/com/flowpowered/engine/SpoutEngine.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package com.flowpowered.engine;
-
-import com.flowpowered.events.EventManager;
-import com.flowpowered.events.SimpleEventManager;
-
-import com.flowpowered.api.Engine;
-import com.flowpowered.api.material.MaterialRegistry;
-import com.flowpowered.api.util.SyncedStringMap;
-import com.flowpowered.engine.filesystem.SpoutFileSystem;
-import com.flowpowered.engine.scheduler.SpoutScheduler;
-import com.flowpowered.engine.util.thread.snapshotable.SnapshotManager;
-
-public abstract class SpoutEngine implements Engine {
- private final SpoutApplication args;
- private final EventManager eventManager;
- private final SpoutFileSystem fileSystem;
-
- private SpoutScheduler scheduler;
- protected final SnapshotManager snapshotManager = new SnapshotManager();
- private SyncedStringMap itemMap;
-
-
- public SpoutEngine(SpoutApplication args) {
- this.args = args;
- this.eventManager = new SimpleEventManager();
- this.fileSystem = new SpoutFileSystem();
- }
-
- @Override
- public String getVersion() {
- return getClass().getPackage().getImplementationVersion();
- }
-
- public void init() {
- itemMap = MaterialRegistry.setupRegistry();
- scheduler = new SpoutScheduler(this);
- }
-
- public void start() {
- scheduler.startMainThread();
- System.out.println("Engine started.");
- }
-
- @Override
- public boolean stop() {
- scheduler.stop();
- System.out.println("Engine stopped");
- return true;
- }
-
- @Override
- public boolean stop(String reason) {
- return stop();
- }
-
- @Override
- public boolean debugMode() {
- return args.debug;
- }
-
- @Override
- public SpoutScheduler getScheduler() {
- return scheduler;
- }
-
- @Override
- public SpoutFileSystem getFileSystem() {
- return fileSystem;
- }
-
- @Override
- public EventManager getEventManager() {
- return eventManager;
- }
-
- @Override
- public String getName() {
- return "Spout Engine";
- }
-
- public SnapshotManager getSnapshotManager() {
- return snapshotManager;
- }
-}
diff --git a/src/main/java/com/flowpowered/engine/SpoutServer.java b/src/main/java/com/flowpowered/engine/SpoutServer.java
deleted file mode 100644
index bd23e56..0000000
--- a/src/main/java/com/flowpowered/engine/SpoutServer.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.flowpowered.engine;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-
-import com.flowpowered.commons.StringUtil;
-
-import com.flowpowered.api.Platform;
-import com.flowpowered.api.Server;
-import com.flowpowered.api.entity.Player;
-import com.flowpowered.api.geo.ServerWorldManager;
-import com.flowpowered.engine.entity.SpoutPlayer;
-import com.flowpowered.engine.geo.world.SpoutServerWorldManager;
-import com.flowpowered.engine.util.thread.snapshotable.SnapshotableLinkedHashMap;
-
-public class SpoutServer extends SpoutEngine implements Server {
- protected final SnapshotableLinkedHashMap players;
- private final SpoutServerWorldManager worldManager;
-
- public SpoutServer(SpoutApplication args) {
- super(args);
- players = new SnapshotableLinkedHashMap<>(snapshotManager);
- worldManager = new SpoutServerWorldManager(this);
- }
-
- @Override
- public Platform getPlatform() {
- return Platform.SERVER;
- }
-
- @Override
- public Collection getOnlinePlayers() {
- Map playerList = players.get();
- ArrayList onlinePlayers = new ArrayList<>(playerList.size());
- for (SpoutPlayer player : playerList.values()) {
- if (player.isOnline()) {
- onlinePlayers.add(player);
- }
- }
- return onlinePlayers;
- }
-
- @Override
- public int getMaxPlayers() {
- // TODO: config
- return 5;
- }
-
- @Override
- public void broadcastMessage(String message) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- @Override
- public void broadcastMessage(String permission, String message) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- @Override
- public Player getPlayer(String name, boolean exact) {
- name = name.toLowerCase();
- if (exact) {
- for (Player player : players.getValues()) {
- if (player.getName().equalsIgnoreCase(name)) {
- return player;
- }
- }
- return null;
- } else {
- return StringUtil.getShortest(StringUtil.matchName(players.getValues(), name));
- }
- }
-
- @Override
- public SpoutServerWorldManager getWorldManager() {
- return worldManager;
- }
-}
diff --git a/src/main/java/com/flowpowered/engine/SpoutSingleplayer.java b/src/main/java/com/flowpowered/engine/SpoutSingleplayer.java
deleted file mode 100644
index 68d79eb..0000000
--- a/src/main/java/com/flowpowered/engine/SpoutSingleplayer.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package com.flowpowered.engine;
-
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.flowpowered.api.Platform;
-import com.flowpowered.api.Singleplayer;
-import com.flowpowered.api.entity.Entity;
-import com.flowpowered.api.entity.Player;
-import com.flowpowered.api.geo.LoadOption;
-import com.flowpowered.api.geo.World;
-import com.flowpowered.api.generator.FlatWorldGenerator;
-import com.flowpowered.api.generator.SolidWorldGenerator;
-import com.flowpowered.api.material.BlockMaterial;
-import com.flowpowered.engine.entity.SpoutPlayer;
-import com.flowpowered.engine.geo.world.SpoutWorld;
-import com.flowpowered.engine.render.DeployNatives;
-import com.flowpowered.engine.render.SpoutRenderer;
-
-import com.flowpowered.math.vector.Vector3f;
-
-public class SpoutSingleplayer extends SpoutServer implements Singleplayer {
- private final AtomicReference player = new AtomicReference<>();
- private final AtomicReference activeWorld = new AtomicReference<>();
-
- // TEST CODE
- private Entity testEntity;
-
- public SpoutSingleplayer(SpoutApplication args) {
- super(args);
- }
-
- @Override
- public void init() {
- try {
- DeployNatives.deploy();
- } catch (Exception ex) {
- Logger.getLogger(SpoutSingleplayer.class.getName()).log(Level.SEVERE, null, ex);
- return;
- }
- super.init();
- SpoutWorld loadedWorld = getWorldManager().loadWorld("fallback", new FlatWorldGenerator(BlockMaterial.SOLID_BLUE));
- activeWorld.set(loadedWorld);
- SpoutPlayer player = new SpoutPlayer("Spout");
- this.player.set(player);
- players.put(player.getName(), player);
- Entity entity = loadedWorld.spawnEntity(Vector3f.ZERO, LoadOption.LOAD_GEN);
- this.testEntity = entity;
- }
-
- public Entity getTestEntity() {
- return testEntity;
- }
-
- @Override
- public void start() {
- getScheduler().startClientThreads();
- super.start();
- }
-
- @Override
- public boolean stop() {
- return super.stop();
-
- }
-
- @Override
- public Platform getPlatform() {
- return Platform.SINGLEPLAYER;
- }
-
- @Override
- public Player getPlayer() {
- return player.get();
- }
-
- @Override
- public World getWorld() {
- return activeWorld.get();
- }
-
- @Override
- public SpoutRenderer getRenderer() {
- return getScheduler().getRenderThread().getRenderer();
- }
-
-}
diff --git a/src/main/java/com/flowpowered/engine/entity/EntityManager.java b/src/main/java/com/flowpowered/engine/entity/EntityManager.java
index 0c96a7f..9992b33 100644
--- a/src/main/java/com/flowpowered/engine/entity/EntityManager.java
+++ b/src/main/java/com/flowpowered/engine/entity/EntityManager.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.entity;
@@ -47,7 +44,7 @@ public class EntityManager {
/**
* A map of all the entity ids to the corresponding entities.
*/
- private final SnapshotableHashMap entities = new SnapshotableHashMap<>(snapshotManager);
+ private final SnapshotableHashMap entities = new SnapshotableHashMap<>(snapshotManager);
/**
* The next id to check.
*/
@@ -55,14 +52,14 @@ public class EntityManager {
/**
* Player listings plus listings of sync'd entities per player
*/
- private final SnapshotableHashMap> players = new SnapshotableHashMap<>(snapshotManager);
+ private final SnapshotableHashMap> players = new SnapshotableHashMap<>(snapshotManager);
/**
* Gets all entities.
*
* @return A collection of entities.
*/
- public Collection getAll() {
+ public Collection getAll() {
return entities.get().values();
}
@@ -71,7 +68,7 @@ public Collection getAll() {
*
* @return A collection of entities
*/
- public Collection getAllLive() {
+ public Collection getAllLive() {
return entities.getLive().values();
}
@@ -90,7 +87,7 @@ public List getPlayers() {
* @param id The id.
* @return The entity, or {@code null} if it could not be found.
*/
- public SpoutEntity getEntity(int id) {
+ public FlowEntity getEntity(int id) {
return entities.get().get(id);
}
@@ -99,15 +96,15 @@ public SpoutEntity getEntity(int id) {
*
* @param entity The entity
*/
- public void addEntity(SpoutEntity entity) {
+ public void addEntity(FlowEntity entity) {
entities.put(entity.getId(), entity);
if (entity instanceof Player) {
- players.put((Player) entity, new ArrayList());
+ players.put((Player) entity, new ArrayList());
}
}
- public static SpoutEntity createEntity(Transform transform) {
- return new SpoutEntity(getNextId(), transform);
+ public static FlowEntity createEntity(Transform transform) {
+ return new FlowEntity(getNextId(), transform);
}
private static int getNextId() {
@@ -123,7 +120,7 @@ private static int getNextId() {
*
* @param entity The entity
*/
- public void removeEntity(SpoutEntity entity) {
+ public void removeEntity(FlowEntity entity) {
entities.remove(entity.getId());
if (entity instanceof Player) {
players.remove((Player) entity);
@@ -134,7 +131,7 @@ public void removeEntity(SpoutEntity entity) {
* Finalizes the manager at the FINALIZERUN tick stage
*/
public void finalizeRun() {
- for (SpoutEntity e : entities.get().values()) {
+ for (FlowEntity e : entities.get().values()) {
e.finalizeRun();
}
}
@@ -143,7 +140,7 @@ public void finalizeRun() {
* Finalizes the manager at the FINALIZERUN tick stage
*/
public void preSnapshotRun() {
- for (SpoutEntity e : entities.get().values()) {
+ for (FlowEntity e : entities.get().values()) {
e.preSnapshotRun();
}
}
@@ -152,14 +149,14 @@ public void preSnapshotRun() {
* Snapshots the manager and all the entities managed in the SNAPSHOT tickstage.
*/
public void copyAllSnapshots() {
- for (SpoutEntity e : entities.get().values()) {
+ for (FlowEntity e : entities.get().values()) {
e.copySnapshot();
}
snapshotManager.copyAllSnapshots();
// We want one more tick with for the removed Entities
// The next tick works with the snapshotted values which contains has all removed entities with isRemoved true
- for (SpoutEntity e : entities.get().values()) {
+ for (FlowEntity e : entities.get().values()) {
if (e.isRemoved()) {
removeEntity(e);
}
diff --git a/src/main/java/com/flowpowered/engine/entity/SpoutEntity.java b/src/main/java/com/flowpowered/engine/entity/FlowEntity.java
similarity index 71%
rename from src/main/java/com/flowpowered/engine/entity/SpoutEntity.java
rename to src/main/java/com/flowpowered/engine/entity/FlowEntity.java
index cb25db9..2a6ecb1 100644
--- a/src/main/java/com/flowpowered/engine/entity/SpoutEntity.java
+++ b/src/main/java/com/flowpowered/engine/entity/FlowEntity.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.entity;
import java.util.Collection;
@@ -16,19 +39,19 @@
import com.flowpowered.api.geo.cuboid.Chunk;
import com.flowpowered.api.geo.cuboid.Region;
import com.flowpowered.api.geo.discrete.Transform;
-import com.flowpowered.engine.geo.chunk.SpoutChunk;
-import com.flowpowered.engine.geo.region.SpoutRegion;
+import com.flowpowered.engine.geo.chunk.FlowChunk;
+import com.flowpowered.engine.geo.region.FlowRegion;
-public class SpoutEntity implements Entity {
+public class FlowEntity implements Entity {
private final int id;
- private SpoutPhysics physics;
+ private FlowPhysics physics;
private ManagedHashMap data;
private Network network;
- public SpoutEntity(int id, Transform transform) {
+ public FlowEntity(int id, Transform transform) {
this.id = id;
- this.physics = new SpoutPhysics(this);
+ this.physics = new FlowPhysics(this);
this.physics.setTransform(transform);
this.physics.copySnapshot();
this.data = new ManagedHashMap();
@@ -71,15 +94,15 @@ public boolean isSavable() {
}
@Override
- public SpoutChunk getChunk() {
+ public FlowChunk getChunk() {
Chunk chunk = physics.getPosition().getChunk(LoadOption.NO_LOAD);
- return (SpoutChunk) chunk;
+ return (FlowChunk) chunk;
}
@Override
- public SpoutRegion getRegion() {
+ public FlowRegion getRegion() {
Region region = physics.getPosition().getRegion(LoadOption.LOAD_GEN);
- return (SpoutRegion) region;
+ return (FlowRegion) region;
}
@Override
@@ -153,8 +176,8 @@ public Collection values() {
}
void finalizeRun() {
- SpoutRegion regionLive = getRegion();
- SpoutRegion regionSnapshot = (SpoutRegion) physics.getSnapshottedTransform().getPosition().getRegion(LoadOption.LOAD_GEN);
+ FlowRegion regionLive = getRegion();
+ FlowRegion regionSnapshot = (FlowRegion) physics.getSnapshottedTransform().getPosition().getRegion(LoadOption.LOAD_GEN);
//Move entity from Region A to Region B
if (regionSnapshot != regionLive) {
boolean activated = physics.isActivated();
diff --git a/src/main/java/com/flowpowered/engine/entity/SpoutEntitySnapshot.java b/src/main/java/com/flowpowered/engine/entity/FlowEntitySnapshot.java
similarity index 67%
rename from src/main/java/com/flowpowered/engine/entity/SpoutEntitySnapshot.java
rename to src/main/java/com/flowpowered/engine/entity/FlowEntitySnapshot.java
index 80621e5..ba19f8f 100644
--- a/src/main/java/com/flowpowered/engine/entity/SpoutEntitySnapshot.java
+++ b/src/main/java/com/flowpowered/engine/entity/FlowEntitySnapshot.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.entity;
@@ -41,7 +38,7 @@
import com.flowpowered.api.entity.EntitySnapshot;
import com.flowpowered.api.geo.discrete.Transform;
-public class SpoutEntitySnapshot implements EntitySnapshot {
+public class FlowEntitySnapshot implements EntitySnapshot {
private final WeakReference entity;
private final int entityId;
private final UUID uniqueId;
@@ -53,7 +50,7 @@ public class SpoutEntitySnapshot implements EntitySnapshot {
private final List> components;
private final long time = System.currentTimeMillis();
- public SpoutEntitySnapshot(Entity e) {
+ public FlowEntitySnapshot(Entity e) {
if (e.isRemoved()) {
throw new IllegalArgumentException("Can not take a snapshot of a removed entity");
}
@@ -79,7 +76,7 @@ public SpoutEntitySnapshot(Entity e) {
}
}
- public SpoutEntitySnapshot(UUID id, Transform t, UUID worldId, byte[] dataMap, List> types) {
+ public FlowEntitySnapshot(UUID id, Transform t, UUID worldId, byte[] dataMap, List> types) {
this.entity = new WeakReference<>(null);
this.entityId = -1;
this.uniqueId = id;
diff --git a/src/main/java/com/flowpowered/engine/entity/SpoutPhysics.java b/src/main/java/com/flowpowered/engine/entity/FlowPhysics.java
similarity index 70%
rename from src/main/java/com/flowpowered/engine/entity/SpoutPhysics.java
rename to src/main/java/com/flowpowered/engine/entity/FlowPhysics.java
index 85be0d6..88cf14a 100644
--- a/src/main/java/com/flowpowered/engine/entity/SpoutPhysics.java
+++ b/src/main/java/com/flowpowered/engine/entity/FlowPhysics.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.entity;
@@ -31,7 +28,7 @@
import com.flowpowered.api.geo.World;
import com.flowpowered.api.geo.discrete.Point;
import com.flowpowered.api.geo.discrete.Transform;
-import com.flowpowered.engine.geo.region.SpoutRegion;
+import com.flowpowered.engine.geo.region.FlowRegion;
import com.flowpowered.engine.util.math.ReactConverter;
import com.flowpowered.math.imaginary.Quaternionf;
import com.flowpowered.math.vector.Vector3f;
@@ -41,10 +38,10 @@
import org.spout.physics.collision.shape.CollisionShape;
/**
- * The Spout implementation of {@link com.flowpowered.api.component.entity.SpoutPhysics}. //TODO: Physics rotation setters
+ * The Flow implementation of {@link Physics}. //TODO: Physics rotation setters
*/
-public class SpoutPhysics extends Physics {
- //Spout
+public class FlowPhysics extends Physics {
+ //Flow
private final Transform snapshot = new Transform();
private final Transform live = new Transform();
//React
@@ -57,12 +54,12 @@ public class SpoutPhysics extends Physics {
private boolean isMobile = true;
private boolean isGhost = false;
- public SpoutPhysics(Entity entity) {
+ public FlowPhysics(Entity entity) {
super(entity);
}
@Override
- public SpoutPhysics activate(final float mass, final CollisionShape shape, final boolean isGhost, final boolean isMobile) {
+ public FlowPhysics activate(final float mass, final CollisionShape shape, final boolean isGhost, final boolean isMobile) {
if (mass < 1f) {
throw new IllegalArgumentException("Cannot activate physics with mass less than 1f");
}
@@ -70,19 +67,19 @@ public SpoutPhysics activate(final float mass, final CollisionShape shape, final
throw new IllegalArgumentException("Cannot activate physics with a null shape");
}
if (body != null) {
- ((SpoutRegion) entity.getRegion()).removeBody(body);
+ ((FlowRegion) entity.getRegion()).removeBody(body);
}
this.isGhost = isGhost;
this.isMobile = isMobile;
this.mass = mass;
this.shape = shape;
activated = true;
- activate((SpoutRegion) entity.getRegion());
+ activate((FlowRegion) entity.getRegion());
return this;
}
- public void activate(final SpoutRegion region) {
+ public void activate(final FlowRegion region) {
body = region.addBody(live, mass, shape, isGhost, isMobile);
body.setMaterial(material);
body.setUserPointer(entity);
@@ -91,7 +88,7 @@ public void activate(final SpoutRegion region) {
@Override
public void deactivate() {
if (entity != null && entity.getRegion() != null && body != null) {
- ((SpoutRegion) entity.getRegion()).removeBody(body);
+ ((FlowRegion) entity.getRegion()).removeBody(body);
}
activated = false;
}
@@ -112,12 +109,12 @@ public Transform getTransform() {
}
@Override
- public SpoutPhysics setTransform(Transform transform) {
+ public FlowPhysics setTransform(Transform transform) {
return setTransform(transform, true);
}
@Override
- public SpoutPhysics setTransform(Transform transform, boolean sync) {
+ public FlowPhysics setTransform(Transform transform, boolean sync) {
if (transform == null) {
throw new IllegalArgumentException("Transform cannot be null!");
}
@@ -139,7 +136,7 @@ public Point getPosition() {
}
@Override
- public SpoutPhysics setPosition(Point point) {
+ public FlowPhysics setPosition(Point point) {
live.setPosition(point);
return this;
}
@@ -155,7 +152,7 @@ public Quaternionf getRotation() {
}
@Override
- public SpoutPhysics setRotation(Quaternionf rotation) {
+ public FlowPhysics setRotation(Quaternionf rotation) {
if (rotation == null) {
throw new IllegalArgumentException("rotation cannot be null!");
}
@@ -175,7 +172,7 @@ public Vector3f getScale() {
}
@Override
- public SpoutPhysics setScale(Vector3f scale) {
+ public FlowPhysics setScale(Vector3f scale) {
if (scale == null) {
throw new IllegalArgumentException("scale cannot be null!");
}
@@ -200,13 +197,13 @@ public boolean isWorldDirty() {
}
@Override
- public SpoutPhysics translate(Vector3f point) {
+ public FlowPhysics translate(Vector3f point) {
live.translate(point);
return this;
}
@Override
- public SpoutPhysics rotate(Quaternionf rotate) {
+ public FlowPhysics rotate(Quaternionf rotate) {
if (rotate == null) {
throw new IllegalArgumentException("rotate cannot be null!");
}
@@ -216,7 +213,7 @@ public SpoutPhysics rotate(Quaternionf rotate) {
}
@Override
- public SpoutPhysics scale(Vector3f scale) {
+ public FlowPhysics scale(Vector3f scale) {
if (scale == null) {
throw new IllegalArgumentException("scale cannot be null!");
}
@@ -226,17 +223,17 @@ public SpoutPhysics scale(Vector3f scale) {
}
@Override
- public SpoutPhysics impulse(Vector3f impulse, Vector3f offset) {
+ public FlowPhysics impulse(Vector3f impulse, Vector3f offset) {
throw new UnsupportedOperationException("Not implemented yet");
}
@Override
- public SpoutPhysics impulse(Vector3f impulse) {
+ public FlowPhysics impulse(Vector3f impulse) {
throw new UnsupportedOperationException("Not implemented yet");
}
@Override
- public SpoutPhysics force(Vector3f force, boolean ignoreGravity) {
+ public FlowPhysics force(Vector3f force, boolean ignoreGravity) {
if (body == null) {
throw new IllegalStateException("Cannot force a null body. If the entity is activated, make sure it is spawned as well");
}
@@ -249,12 +246,12 @@ public SpoutPhysics force(Vector3f force, boolean ignoreGravity) {
}
@Override
- public SpoutPhysics force(Vector3f force) {
+ public FlowPhysics force(Vector3f force) {
return force(force, false);
}
@Override
- public SpoutPhysics torque(Vector3f torque) {
+ public FlowPhysics torque(Vector3f torque) {
if (body == null) {
throw new IllegalStateException("Cannot torque a null body. If the entity is activated, make sure it is spawned as well");
}
@@ -263,17 +260,17 @@ public SpoutPhysics torque(Vector3f torque) {
}
@Override
- public SpoutPhysics impulseTorque(Vector3f torque) {
+ public FlowPhysics impulseTorque(Vector3f torque) {
throw new UnsupportedOperationException("Not implemented yet");
}
@Override
- public SpoutPhysics dampenMovement(float damp) {
+ public FlowPhysics dampenMovement(float damp) {
throw new UnsupportedOperationException("Not implemented yet");
}
@Override
- public SpoutPhysics dampenRotation(float damp) {
+ public FlowPhysics dampenRotation(float damp) {
throw new UnsupportedOperationException("Not implemented yet");
}
@@ -283,7 +280,7 @@ public float getMass() {
}
@Override
- public SpoutPhysics setMass(float mass) {
+ public FlowPhysics setMass(float mass) {
if (!isActivated()) {
throw new IllegalStateException("Entities cannot have mass until they are activated");
}
@@ -304,7 +301,7 @@ public float getFriction() {
}
@Override
- public SpoutPhysics setFriction(float friction) {
+ public FlowPhysics setFriction(float friction) {
if (friction < 0f || friction > 1f) {
throw new IllegalArgumentException("Friction must be between 0f and 1f (inclusive)");
}
@@ -318,7 +315,7 @@ public float getRestitution() {
}
@Override
- public SpoutPhysics setRestitution(float restitution) {
+ public FlowPhysics setRestitution(float restitution) {
if (restitution < 0f || restitution > 1f) {
throw new IllegalArgumentException("Restitution must be between 0f and 1f (inclusive)");
}
@@ -331,11 +328,11 @@ public Vector3f getMovementVelocity() {
if (body == null) {
throw new IllegalStateException("Cannot get velocity of a null body. If the entity is activated, make sure it is spawned as well");
}
- return ReactConverter.toSpoutVector3(body.getLinearVelocity());
+ return ReactConverter.toFlowVector3(body.getLinearVelocity());
}
@Override
- public SpoutPhysics setMovementVelocity(Vector3f velocity) {
+ public FlowPhysics setMovementVelocity(Vector3f velocity) {
if (body == null) {
throw new IllegalStateException("Cannot set velocity of a null body. If the entity is activated, make sure it is spawned as well");
}
@@ -351,11 +348,11 @@ public Vector3f getRotationVelocity() {
if (body == null) {
throw new IllegalStateException("Cannot get rotation velocity of a null body. If the entity is activated, make sure it is spawned as well");
}
- return ReactConverter.toSpoutVector3(body.getAngularVelocity());
+ return ReactConverter.toFlowVector3(body.getAngularVelocity());
}
@Override
- public SpoutPhysics setRotationVelocity(Vector3f velocity) {
+ public FlowPhysics setRotationVelocity(Vector3f velocity) {
if (body == null) {
throw new IllegalStateException("Cannot set rotation velocity of a null body. If the entity is activated, make sure it is spawned as well");
}
@@ -387,7 +384,7 @@ public String toString() {
}
/**
- * Called before the simulation is polled for an update. This aligns the body's transform with Spout's if someone moves without physics.
+ * Called before the simulation is polled for an update. This aligns the body's transform with Flow's if someone moves without physics.
*/
public void onPrePhysicsTick() {
if (body == null) {
@@ -398,10 +395,10 @@ public void onPrePhysicsTick() {
}
/**
- * Called after the simulation was polled for an update. This updates Spout's live with the transform of the body. The render transform is updated with interpolation from the body
+ * Called after the simulation was polled for an update. This updates Flow's live with the transform of the body. The render transform is updated with interpolation from the body
*/
public void onPostPhysicsTick(float dt) {
- final Transform physicsLive = ReactConverter.toSpoutTransform(body.getTransform(), live.getPosition().getWorld(), live.getScale());
+ final Transform physicsLive = ReactConverter.toFlowTransform(body.getTransform(), live.getPosition().getWorld(), live.getScale());
if (!live.equals(physicsLive)) {
live.set(physicsLive);
sync();
diff --git a/src/main/java/com/flowpowered/engine/entity/SpoutPlayer.java b/src/main/java/com/flowpowered/engine/entity/FlowPlayer.java
similarity index 76%
rename from src/main/java/com/flowpowered/engine/entity/SpoutPlayer.java
rename to src/main/java/com/flowpowered/engine/entity/FlowPlayer.java
index cd1865c..7904c25 100644
--- a/src/main/java/com/flowpowered/engine/entity/SpoutPlayer.java
+++ b/src/main/java/com/flowpowered/engine/entity/FlowPlayer.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.entity;
import java.util.List;
@@ -12,10 +35,10 @@
import com.flowpowered.api.entity.PlayerSnapshot;
import com.flowpowered.api.geo.discrete.Transform;
-public class SpoutPlayer implements Player {
+public class FlowPlayer implements Player {
private final String name;
- public SpoutPlayer(String name) {
+ public FlowPlayer(String name) {
this.name = name;
}
diff --git a/src/main/java/com/flowpowered/engine/entity/FlowPlayerSnapshot.java b/src/main/java/com/flowpowered/engine/entity/FlowPlayerSnapshot.java
new file mode 100644
index 0000000..1806f84
--- /dev/null
+++ b/src/main/java/com/flowpowered/engine/entity/FlowPlayerSnapshot.java
@@ -0,0 +1,64 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.flowpowered.engine.entity;
+
+import java.lang.ref.WeakReference;
+
+import com.flowpowered.api.entity.Player;
+import com.flowpowered.api.entity.PlayerSnapshot;
+import com.flowpowered.api.geo.discrete.Transform;
+
+public class FlowPlayerSnapshot implements PlayerSnapshot {
+ private final Transform cameraLocation;
+ private final String name;
+ private final WeakReference player;
+ private final long time;
+
+ public FlowPlayerSnapshot(Player player) {
+ this.cameraLocation = player.getCameraLocation().copy();
+ this.name = player.getName();
+ this.player = new WeakReference<>(player);
+ this.time = System.currentTimeMillis();
+ }
+
+ @Override
+ public Transform getCameraLocation() {
+ return cameraLocation;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public Player getReference() {
+ return player.get();
+ }
+
+ @Override
+ public long getSnapshotTime() {
+ return time;
+ }
+}
diff --git a/src/main/java/com/flowpowered/engine/entity/Network.java b/src/main/java/com/flowpowered/engine/entity/Network.java
index fe6e8ff..2b2cc2d 100644
--- a/src/main/java/com/flowpowered/engine/entity/Network.java
+++ b/src/main/java/com/flowpowered/engine/entity/Network.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.entity;
@@ -39,7 +36,7 @@
import com.flowpowered.commons.datatable.defaulted.DefaultedKeyImpl;
import com.flowpowered.api.Platform;
-import com.flowpowered.api.Spout;
+import com.flowpowered.api.Flow;
import com.flowpowered.api.entity.Entity;
import com.flowpowered.api.geo.LoadOption;
import com.flowpowered.api.geo.World;
@@ -169,7 +166,7 @@ public int getSyncDistance() {
* @param syncDistance The new sync distance
*/
public void setSyncDistance(final int syncDistance) {
- //TODO: Enforce server maximum (but that is set in Spout...)
+ //TODO: Enforce server maximum (but that is set in Flow...)
entity.getData().put(SYNC_DISTANCE, syncDistance);
}
@@ -178,12 +175,12 @@ public void setSyncDistance(final int syncDistance) {
/**
* Called when the owner is set to be synchronized to other NetworkComponents.
*
- * TODO: Common logic between Spout and a plugin needing to implement this component? TODO: Add sequence checks to the PhysicsComponent to prevent updates to live?
+ * TODO: Common logic between Flow and a plugin needing to implement this component? TODO: Add sequence checks to the PhysicsComponent to prevent updates to live?
*
* @param live A copy of the owner's live transform state
*/
public void finalizeRun(final Transform live) {
- if (!Spout.getPlatform().isServer()) {
+ if (!Flow.getPlatform().isServer()) {
return;
}
//Entity changed chunks as observer OR observer status changed so update
diff --git a/src/main/java/com/flowpowered/engine/entity/OutwardIterator.java b/src/main/java/com/flowpowered/engine/entity/OutwardIterator.java
index 42e40e7..bfb0422 100644
--- a/src/main/java/com/flowpowered/engine/entity/OutwardIterator.java
+++ b/src/main/java/com/flowpowered/engine/entity/OutwardIterator.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.entity;
diff --git a/src/main/java/com/flowpowered/engine/entity/SpoutPlayerSnapshot.java b/src/main/java/com/flowpowered/engine/entity/SpoutPlayerSnapshot.java
deleted file mode 100644
index 73f978b..0000000
--- a/src/main/java/com/flowpowered/engine/entity/SpoutPlayerSnapshot.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.flowpowered.engine.entity;
-
-import java.lang.ref.WeakReference;
-
-import com.flowpowered.api.entity.Player;
-import com.flowpowered.api.entity.PlayerSnapshot;
-import com.flowpowered.api.geo.discrete.Transform;
-
-public class SpoutPlayerSnapshot implements PlayerSnapshot {
- private final Transform cameraLocation;
- private final String name;
- private final WeakReference player;
- private final long time;
-
- public SpoutPlayerSnapshot(Player player) {
- this.cameraLocation = player.getCameraLocation().copy();
- this.name = player.getName();
- this.player = new WeakReference<>(player);
- this.time = System.currentTimeMillis();
- }
-
- @Override
- public Transform getCameraLocation() {
- return cameraLocation;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public Player getReference() {
- return player.get();
- }
-
- @Override
- public long getSnapshotTime() {
- return time;
- }
-}
diff --git a/src/main/java/com/flowpowered/engine/filesystem/ChunkDataForRegion.java b/src/main/java/com/flowpowered/engine/filesystem/ChunkDataForRegion.java
index cd41613..d446a68 100644
--- a/src/main/java/com/flowpowered/engine/filesystem/ChunkDataForRegion.java
+++ b/src/main/java/com/flowpowered/engine/filesystem/ChunkDataForRegion.java
@@ -1,36 +1,33 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.filesystem;
import java.util.ArrayList;
import java.util.List;
-import com.flowpowered.engine.entity.SpoutEntitySnapshot;
+import com.flowpowered.engine.entity.FlowEntitySnapshot;
public class ChunkDataForRegion {
- public final List loadedEntities = new ArrayList<>(10);
+ public final List loadedEntities = new ArrayList<>(10);
}
diff --git a/src/main/java/com/flowpowered/engine/filesystem/ChunkFiles.java b/src/main/java/com/flowpowered/engine/filesystem/ChunkFiles.java
index bfc1d78..9d46bcd 100644
--- a/src/main/java/com/flowpowered/engine/filesystem/ChunkFiles.java
+++ b/src/main/java/com/flowpowered/engine/filesystem/ChunkFiles.java
@@ -1,12 +1,35 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.filesystem;
import java.io.InputStream;
-import com.flowpowered.engine.geo.chunk.SpoutChunk;
-import com.flowpowered.engine.geo.region.SpoutRegion;
+import com.flowpowered.engine.geo.chunk.FlowChunk;
+import com.flowpowered.engine.geo.region.FlowRegion;
public class ChunkFiles {
- public static SpoutChunk loadChunk(SpoutRegion aThis, int x, int y, int z, InputStream stream, ChunkDataForRegion dataForRegion) {
+ public static FlowChunk loadChunk(FlowRegion aThis, int x, int y, int z, InputStream stream, ChunkDataForRegion dataForRegion) {
return null;
}
}
diff --git a/src/main/java/com/flowpowered/engine/filesystem/FlowFileSystem.java b/src/main/java/com/flowpowered/engine/filesystem/FlowFileSystem.java
new file mode 100644
index 0000000..9b5b72a
--- /dev/null
+++ b/src/main/java/com/flowpowered/engine/filesystem/FlowFileSystem.java
@@ -0,0 +1,32 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.flowpowered.engine.filesystem;
+
+import java.io.File;
+import com.flowpowered.filesystem.SimpleFileSystem;
+
+public class FlowFileSystem extends SimpleFileSystem {
+ public static final File PLAYERS_DIRECTORY = new File("players");
+ public static final File WORLDS_DIRECTORY = new File("worlds");
+}
diff --git a/src/main/java/com/flowpowered/engine/filesystem/SpoutFileSystem.java b/src/main/java/com/flowpowered/engine/filesystem/SpoutFileSystem.java
deleted file mode 100644
index 01f92a3..0000000
--- a/src/main/java/com/flowpowered/engine/filesystem/SpoutFileSystem.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.flowpowered.engine.filesystem;
-
-import java.io.File;
-import com.flowpowered.filesystem.SimpleFileSystem;
-
-public class SpoutFileSystem extends SimpleFileSystem {
- public static final File PLAYERS_DIRECTORY = new File("players");
- public static final File WORLDS_DIRECTORY = new File("worlds");
-}
diff --git a/src/main/java/com/flowpowered/engine/filesystem/WorldFiles.java b/src/main/java/com/flowpowered/engine/filesystem/WorldFiles.java
index 46711eb..0dfed1d 100644
--- a/src/main/java/com/flowpowered/engine/filesystem/WorldFiles.java
+++ b/src/main/java/com/flowpowered/engine/filesystem/WorldFiles.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.filesystem;
@@ -41,13 +38,13 @@
import com.flowpowered.commons.store.BinaryFileStore;
import com.flowpowered.api.Server;
-import com.flowpowered.api.Spout;
+import com.flowpowered.api.Flow;
import com.flowpowered.api.generator.WorldGenerator;
import com.flowpowered.api.geo.discrete.Transform;
import com.flowpowered.api.io.nbt.TransformTag;
import com.flowpowered.api.io.nbt.UUIDTag;
-import com.flowpowered.engine.SpoutEngine;
-import com.flowpowered.engine.geo.world.SpoutServerWorld;
+import com.flowpowered.engine.FlowEngine;
+import com.flowpowered.engine.geo.world.FlowServerWorld;
import org.spout.nbt.ByteArrayTag;
import org.spout.nbt.ByteTag;
@@ -62,12 +59,12 @@
public class WorldFiles {
public static final byte WORLD_VERSION = 1;
- public static SpoutServerWorld loadWorld(E engine, WorldGenerator generator, String worldName) {
- File worldDir = new File(SpoutFileSystem.WORLDS_DIRECTORY, worldName);
+ public static FlowServerWorld loadWorld(E engine, WorldGenerator generator, String worldName) {
+ File worldDir = new File(FlowFileSystem.WORLDS_DIRECTORY, worldName);
worldDir.mkdirs();
File worldFile = new File(worldDir, "world.dat");
- SpoutServerWorld world = null;
+ FlowServerWorld world = null;
File itemMapFile = new File(worldDir, "materials.dat");
BinaryFileStore itemStore = new BinaryFileStore(itemMapFile);
@@ -98,29 +95,29 @@ public static SpoutServerWorld loadWorld(E engi
try {
ns.close();
} catch (IOException e) {
- Spout.info("Cannot close world file");
+ Flow.info("Cannot close world file");
}
}
- Spout.info("Loading world [{0}]", worldName);
+ Flow.info("Loading world [{0}]", worldName);
world = loadWorldImpl(engine, worldName, map, generator, itemMap);
} catch (FileNotFoundException ioe) {
- Spout.info("Creating new world named [{0}]", worldName);
+ Flow.info("Creating new world named [{0}]", worldName);
- world = new SpoutServerWorld(engine, worldName, generator);
+ world = new FlowServerWorld(engine, worldName, generator);
world.save();
} catch (IOException ioe) {
- Spout.severe("Error reading file for world " + worldName, ioe);
+ Flow.severe("Error reading file for world " + worldName, ioe);
}
return world;
}
- private static SpoutServerWorld loadWorldImpl(SpoutEngine engine, String name, CompoundMap map, WorldGenerator fallbackGenerator, StringToUniqueIntegerMap itemMap) {
+ private static FlowServerWorld loadWorldImpl(FlowEngine engine, String name, CompoundMap map, WorldGenerator fallbackGenerator, StringToUniqueIntegerMap itemMap) {
byte version = SafeCast.toByte(NBTMapper.toTagValue(map.get("version")), (byte) -1);
if (version > WORLD_VERSION) {
- Spout.severe("World version " + version + " exceeds maximum allowed value of " + WORLD_VERSION);
+ Flow.severe("World version " + version + " exceeds maximum allowed value of " + WORLD_VERSION);
return null;
} else if (version < WORLD_VERSION) {
- Spout.severe("Outdated World version " + version);
+ Flow.severe("Outdated World version " + version);
return null;
}
@@ -132,7 +129,7 @@ private static SpoutServerWorld loadWorldImpl(SpoutEngine engine, String name, C
WorldGenerator generator = findGenerator(generatorName, fallbackGenerator);
- SpoutServerWorld world = new SpoutServerWorld(engine, name, uuid, age, generator, seed);
+ FlowServerWorld world = new FlowServerWorld(engine, name, uuid, age, generator, seed);
Transform t = TransformTag.getValue(world, map.get("spawn_position"));
@@ -143,7 +140,7 @@ private static SpoutServerWorld loadWorldImpl(SpoutEngine engine, String name, C
try {
dataMap.deserialize(extraData);
} catch (IOException e) {
- Spout.severe("Could not deserialize datatable for world: " + name, e);
+ Flow.severe("Could not deserialize datatable for world: " + name, e);
}
return world;
@@ -152,14 +149,14 @@ private static SpoutServerWorld loadWorldImpl(SpoutEngine engine, String name, C
private static WorldGenerator findGenerator(String wanted, WorldGenerator given) {
// TODO: lookup class name
if (!wanted.equals(given.getClass().getName())) {
- Spout.severe("World was saved last with the generator: " + wanted + " but is being loaded with: " + given.getClass().getName() + " THIS MAY CAUSE WORLD CORRUPTION!");
+ Flow.severe("World was saved last with the generator: " + wanted + " but is being loaded with: " + given.getClass().getName() + " THIS MAY CAUSE WORLD CORRUPTION!");
}
return given;
}
- public static void saveWorld(SpoutServerWorld world) {
+ public static void saveWorld(FlowServerWorld world) {
- File worldDir = new File(SpoutFileSystem.WORLDS_DIRECTORY, world.getName());
+ File worldDir = new File(FlowFileSystem.WORLDS_DIRECTORY, world.getName());
worldDir.mkdirs();
@@ -177,7 +174,7 @@ public static void saveWorld(SpoutServerWorld world) {
ns = new NBTOutputStream(is, false);
ns.writeTag(new CompoundTag("world_" + world.getName(), map));
} catch (IOException ioe) {
- Spout.severe("Error writing file for world " + world.getName());
+ Flow.severe("Error writing file for world " + world.getName());
} finally {
if (ns != null) {
try {
@@ -188,7 +185,7 @@ public static void saveWorld(SpoutServerWorld world) {
}
}
- private static CompoundMap saveWorldImpl(SpoutServerWorld world) {
+ private static CompoundMap saveWorldImpl(FlowServerWorld world) {
CompoundMap map = new CompoundMap();
map.put(new ByteTag("version", WORLD_VERSION));
diff --git a/src/main/java/com/flowpowered/engine/geo/SpoutBlock.java b/src/main/java/com/flowpowered/engine/geo/FlowBlock.java
similarity index 76%
rename from src/main/java/com/flowpowered/engine/geo/SpoutBlock.java
rename to src/main/java/com/flowpowered/engine/geo/FlowBlock.java
index 1006bf2..f712db9 100644
--- a/src/main/java/com/flowpowered/engine/geo/SpoutBlock.java
+++ b/src/main/java/com/flowpowered/engine/geo/FlowBlock.java
@@ -1,34 +1,31 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.geo;
-import com.flowpowered.engine.geo.chunk.SpoutChunk;
-import com.flowpowered.engine.geo.world.SpoutWorld;
-import com.flowpowered.engine.geo.region.SpoutRegion;
+import com.flowpowered.engine.geo.chunk.FlowChunk;
+import com.flowpowered.engine.geo.world.FlowWorld;
+import com.flowpowered.engine.geo.region.FlowRegion;
import java.lang.ref.WeakReference;
import java.util.Collection;
@@ -39,7 +36,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;
import com.flowpowered.api.Platform;
-import com.flowpowered.api.Spout;
+import com.flowpowered.api.Flow;
import com.flowpowered.api.component.BlockComponentOwner;
import com.flowpowered.api.component.Component;
import com.flowpowered.api.geo.LoadOption;
@@ -52,12 +49,12 @@
import com.flowpowered.math.vector.Vector3f;
import com.flowpowered.math.vector.Vector3i;
-public class SpoutBlock implements Block {
+public class FlowBlock implements Block {
private final int x, y, z;
- private final WeakReference extends SpoutWorld> world;
+ private final WeakReference extends FlowWorld> world;
private final ChunkReference chunk;
- public SpoutBlock(SpoutWorld world, int x, int y, int z) {
+ public FlowBlock(FlowWorld world, int x, int y, int z) {
this.x = x;
this.y = y;
this.z = z;
@@ -71,13 +68,13 @@ public Point getPosition() {
}
@Override
- public SpoutChunk getChunk() {
- return (SpoutChunk) this.chunk.refresh(LoadOption.LOAD_GEN);
+ public FlowChunk getChunk() {
+ return (FlowChunk) this.chunk.refresh(LoadOption.LOAD_GEN);
}
@Override
- public SpoutWorld getWorld() {
- SpoutWorld world = this.world.get();
+ public FlowWorld getWorld() {
+ FlowWorld world = this.world.get();
if (world == null) {
throw new IllegalStateException("The world has been unloaded!");
}
@@ -124,7 +121,7 @@ public Block translate(Vector3i offset) {
@Override
public Block translate(int dx, int dy, int dz) {
- return new SpoutBlock(getWorld(), this.x + dx, this.y + dy, this.z + dz);
+ return new FlowBlock(getWorld(), this.x + dx, this.y + dy, this.z + dz);
}
@Override
@@ -152,7 +149,7 @@ public String toString() {
@Override
public boolean setMaterial(BlockMaterial material, int data, Cause> cause) {
// TODO once stable, remove this
- if (Spout.getPlatform() != Platform.SERVER) {
+ if (Flow.getPlatform() != Platform.SERVER) {
throw new UnsupportedOperationException("Temporary lockdown of setMaterial. Server only!");
}
return this.getChunk().setBlockMaterial(x, y, z, material, (short) data, cause);
@@ -164,23 +161,23 @@ public boolean setMaterial(BlockMaterial material, int data) {
}
@Override
- public SpoutBlock setData(BlockMaterial data) {
+ public FlowBlock setData(BlockMaterial data) {
return this.setData(data.getData());
}
@Override
- public SpoutBlock setData(int data) {
+ public FlowBlock setData(int data) {
return setData(data, null);
}
@Override
- public SpoutBlock setData(int data, Cause> cause) {
+ public FlowBlock setData(int data, Cause> cause) {
this.getChunk().setBlockData(this.x, this.y, this.z, (short) data, cause);
return this;
}
@Override
- public SpoutBlock addData(int data) {
+ public FlowBlock addData(int data) {
this.getChunk().addBlockData(this.x, this.y, this.z, (short) data, null);
return this;
}
@@ -226,8 +223,8 @@ public int addDataField(int bits, int value) {
}
@Override
- public SpoutRegion getRegion() {
- return (SpoutRegion) this.getChunk().getRegion();
+ public FlowRegion getRegion() {
+ return (FlowRegion) this.getChunk().getRegion();
}
@Override
diff --git a/src/main/java/com/flowpowered/engine/geo/chunk/SpoutChunk.java b/src/main/java/com/flowpowered/engine/geo/chunk/FlowChunk.java
similarity index 84%
rename from src/main/java/com/flowpowered/engine/geo/chunk/SpoutChunk.java
rename to src/main/java/com/flowpowered/engine/geo/chunk/FlowChunk.java
index 1b4c205..b921bfd 100644
--- a/src/main/java/com/flowpowered/engine/geo/chunk/SpoutChunk.java
+++ b/src/main/java/com/flowpowered/engine/geo/chunk/FlowChunk.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.geo.chunk;
import java.util.List;
@@ -22,15 +45,15 @@
import com.flowpowered.api.geo.cuboid.ChunkSnapshot;
import com.flowpowered.api.material.BlockMaterial;
import com.flowpowered.api.util.cuboid.CuboidBlockMaterialBuffer;
-import com.flowpowered.engine.geo.SpoutBlock;
-import com.flowpowered.engine.geo.region.SpoutRegion;
-import com.flowpowered.engine.geo.world.SpoutWorld;
+import com.flowpowered.engine.geo.FlowBlock;
+import com.flowpowered.engine.geo.region.FlowRegion;
+import com.flowpowered.engine.geo.world.FlowWorld;
import com.flowpowered.math.GenericMath;
import com.flowpowered.math.vector.Vector3f;
-public class SpoutChunk extends Chunk {
+public class FlowChunk extends Chunk {
- private final SpoutRegion region;
+ private final FlowRegion region;
/**
* Data map and Datatable associated with it
*/
@@ -45,7 +68,7 @@ public class SpoutChunk extends Chunk {
*/
protected final AtomicBlockStore blockStore;
- public SpoutChunk(SpoutRegion region, World world, int x, int y, int z, int generationIndex, AtomicBlockStore blockStore) {
+ public FlowChunk(FlowRegion region, World world, int x, int y, int z, int generationIndex, AtomicBlockStore blockStore) {
super(world, x << BLOCKS.BITS, y << BLOCKS.BITS, z << BLOCKS.BITS);
this.region = region;
this.dataMap = new ManagedHashMap();
@@ -104,7 +127,7 @@ public boolean removeObserver(Entity player) {
}
@Override
- public SpoutRegion getRegion() {
+ public FlowRegion getRegion() {
return region;
}
@@ -224,17 +247,17 @@ public int addBlockDataField(int x, int y, int z, int bits, int value, Cause>
}
@Override
- public SpoutBlock getBlock(int x, int y, int z) {
- return new SpoutBlock((SpoutWorld) getWorld(), x, y, z);
+ public FlowBlock getBlock(int x, int y, int z) {
+ return new FlowBlock((FlowWorld) getWorld(), x, y, z);
}
@Override
- public SpoutBlock getBlock(float x, float y, float z) {
+ public FlowBlock getBlock(float x, float y, float z) {
return this.getBlock(GenericMath.floor(x), GenericMath.floor(y), GenericMath.floor(z));
}
@Override
- public SpoutBlock getBlock(Vector3f position) {
+ public FlowBlock getBlock(Vector3f position) {
return this.getBlock(position.getX(), position.getY(), position.getZ());
}
diff --git a/src/main/java/com/flowpowered/engine/geo/chunk/SpoutChunkSnapshot.java b/src/main/java/com/flowpowered/engine/geo/chunk/FlowChunkSnapshot.java
similarity index 64%
rename from src/main/java/com/flowpowered/engine/geo/chunk/SpoutChunkSnapshot.java
rename to src/main/java/com/flowpowered/engine/geo/chunk/FlowChunkSnapshot.java
index b758772..68dd7bf 100644
--- a/src/main/java/com/flowpowered/engine/geo/chunk/SpoutChunkSnapshot.java
+++ b/src/main/java/com/flowpowered/engine/geo/chunk/FlowChunkSnapshot.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.geo.chunk;
import java.util.List;
@@ -11,11 +34,11 @@
import com.flowpowered.api.material.BlockMaterial;
import com.flowpowered.api.material.block.BlockFullState;
-public class SpoutChunkSnapshot extends ChunkSnapshot {
+public class FlowChunkSnapshot extends ChunkSnapshot {
private final short[] ids;
private final short[] data;
- public SpoutChunkSnapshot(World world, float x, float y, float z, short[] ids, short[] data) {
+ public FlowChunkSnapshot(World world, float x, float y, float z, short[] ids, short[] data) {
super(world, x, y, z);
this.ids = ids;
this.data = data;
diff --git a/src/main/java/com/flowpowered/engine/geo/chunk/FlowChunkSnapshotFuture.java b/src/main/java/com/flowpowered/engine/geo/chunk/FlowChunkSnapshotFuture.java
new file mode 100644
index 0000000..684dbff
--- /dev/null
+++ b/src/main/java/com/flowpowered/engine/geo/chunk/FlowChunkSnapshotFuture.java
@@ -0,0 +1,54 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.flowpowered.engine.geo.chunk;
+
+import com.flowpowered.api.geo.cuboid.ChunkSnapshot;
+import com.flowpowered.api.geo.cuboid.ChunkSnapshot.EntityType;
+import com.flowpowered.api.geo.cuboid.ChunkSnapshot.ExtraData;
+import com.flowpowered.api.geo.cuboid.ChunkSnapshot.SnapshotType;
+import com.flowpowered.commons.future.SimpleFuture;
+
+public class FlowChunkSnapshotFuture extends SimpleFuture implements Runnable {
+ private final FlowChunk chunk;
+ private final SnapshotType type;
+ private final EntityType entities;
+ private final ExtraData data;
+
+ public FlowChunkSnapshotFuture(FlowChunk chunk, SnapshotType type, EntityType entities, ExtraData data) {
+ this.chunk = chunk;
+ this.type = type;
+ this.entities = entities;
+ this.data = data;
+ }
+
+ @Override
+ public void run() {
+ try {
+ ChunkSnapshot snapshot = chunk.getSnapshot(type, entities, data);
+ super.setResult(snapshot);
+ } catch (Throwable t) {
+ super.setThrowable(t);
+ }
+ }
+}
diff --git a/src/main/java/com/flowpowered/engine/geo/chunk/SpoutChunkSnapshotGroup.java b/src/main/java/com/flowpowered/engine/geo/chunk/FlowChunkSnapshotGroup.java
similarity index 58%
rename from src/main/java/com/flowpowered/engine/geo/chunk/SpoutChunkSnapshotGroup.java
rename to src/main/java/com/flowpowered/engine/geo/chunk/FlowChunkSnapshotGroup.java
index 4a1e3bf..7102df8 100644
--- a/src/main/java/com/flowpowered/engine/geo/chunk/SpoutChunkSnapshotGroup.java
+++ b/src/main/java/com/flowpowered/engine/geo/chunk/FlowChunkSnapshotGroup.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.geo.chunk;
import com.flowpowered.api.geo.cuboid.Chunk;
@@ -5,11 +28,11 @@
import com.flowpowered.api.geo.cuboid.ChunkSnapshotGroup;
import com.flowpowered.api.material.BlockMaterial;
-public class SpoutChunkSnapshotGroup implements ChunkSnapshotGroup {
+public class FlowChunkSnapshotGroup implements ChunkSnapshotGroup {
private final int cx, cy, cz;
private final ChunkSnapshot[][][] chunks;
- public SpoutChunkSnapshotGroup(int cx, int cy, int cz, ChunkSnapshot[][][] chunks) {
+ public FlowChunkSnapshotGroup(int cx, int cy, int cz, ChunkSnapshot[][][] chunks) {
this.cx = cx;
this.cy = cy;
this.cz = cz;
diff --git a/src/main/java/com/flowpowered/engine/geo/chunk/SpoutChunkSnapshotFuture.java b/src/main/java/com/flowpowered/engine/geo/chunk/SpoutChunkSnapshotFuture.java
deleted file mode 100644
index dc662ea..0000000
--- a/src/main/java/com/flowpowered/engine/geo/chunk/SpoutChunkSnapshotFuture.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * This file is part of Spout.
- *
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
- *
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
- *
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
- *
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
- */
-package com.flowpowered.engine.geo.chunk;
-
-import com.flowpowered.api.geo.cuboid.ChunkSnapshot;
-import com.flowpowered.api.geo.cuboid.ChunkSnapshot.EntityType;
-import com.flowpowered.api.geo.cuboid.ChunkSnapshot.ExtraData;
-import com.flowpowered.api.geo.cuboid.ChunkSnapshot.SnapshotType;
-import com.flowpowered.commons.future.SimpleFuture;
-
-public class SpoutChunkSnapshotFuture extends SimpleFuture implements Runnable {
- private final SpoutChunk chunk;
- private final SnapshotType type;
- private final EntityType entities;
- private final ExtraData data;
-
- public SpoutChunkSnapshotFuture(SpoutChunk chunk, SnapshotType type, EntityType entities, ExtraData data) {
- this.chunk = chunk;
- this.type = type;
- this.entities = entities;
- this.data = data;
- }
-
- @Override
- public void run() {
- try {
- ChunkSnapshot snapshot = chunk.getSnapshot(type, entities, data);
- super.setResult(snapshot);
- } catch (Throwable t) {
- super.setThrowable(t);
- }
- }
-}
diff --git a/src/main/java/com/flowpowered/engine/geo/region/SpoutRegion.java b/src/main/java/com/flowpowered/engine/geo/region/FlowRegion.java
similarity index 79%
rename from src/main/java/com/flowpowered/engine/geo/region/SpoutRegion.java
rename to src/main/java/com/flowpowered/engine/geo/region/FlowRegion.java
index 35f687a..cd1da13 100644
--- a/src/main/java/com/flowpowered/engine/geo/region/SpoutRegion.java
+++ b/src/main/java/com/flowpowered/engine/geo/region/FlowRegion.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.geo.region;
import java.io.IOException;
@@ -12,7 +35,7 @@
import com.flowpowered.events.Cause;
import com.flowpowered.math.vector.Vector3f;
-import com.flowpowered.api.Spout;
+import com.flowpowered.api.Flow;
import com.flowpowered.api.entity.Entity;
import com.flowpowered.api.entity.Player;
import com.flowpowered.api.geo.LoadOption;
@@ -26,27 +49,27 @@
import com.flowpowered.api.scheduler.TaskManager;
import com.flowpowered.api.scheduler.TickStage;
import com.flowpowered.api.util.cuboid.CuboidBlockMaterialBuffer;
-import com.flowpowered.engine.SpoutEngine;
+import com.flowpowered.engine.FlowEngine;
import com.flowpowered.engine.entity.EntityManager;
-import com.flowpowered.engine.entity.SpoutEntity;
-import com.flowpowered.engine.entity.SpoutEntitySnapshot;
+import com.flowpowered.engine.entity.FlowEntity;
+import com.flowpowered.engine.entity.FlowEntitySnapshot;
import com.flowpowered.engine.filesystem.ChunkDataForRegion;
import com.flowpowered.engine.filesystem.ChunkFiles;
-import com.flowpowered.engine.geo.chunk.SpoutChunk;
+import com.flowpowered.engine.geo.chunk.FlowChunk;
import com.flowpowered.engine.geo.snapshot.RegionSnapshot;
-import com.flowpowered.engine.geo.world.SpoutWorld;
+import com.flowpowered.engine.geo.world.FlowWorld;
import com.flowpowered.engine.scheduler.render.RenderThread;
import com.flowpowered.engine.util.thread.CompleteAsyncManager;
import org.spout.physics.body.RigidBody;
import org.spout.physics.collision.shape.CollisionShape;
-public class SpoutRegion extends Region implements CompleteAsyncManager {
+public class FlowRegion extends Region implements CompleteAsyncManager {
private final RegionGenerator generator;
/**
* Reference to the persistent ByteArrayArray that stores chunk data
*/
private final BAAWrapper chunkStore;
- protected final SpoutEngine engine;
+ protected final FlowEngine engine;
/**
* Holds all of the entities to be simulated
*/
@@ -55,16 +78,15 @@ public class SpoutRegion extends Region implements CompleteAsyncManager {
/**
* Chunks used for ticking.
*/
- protected final AtomicReference chunks = new AtomicReference<>(new SpoutChunk[CHUNKS.VOLUME]);
+ protected final AtomicReference chunks = new AtomicReference<>(new FlowChunk[CHUNKS.VOLUME]);
/**
* All live chunks. These are not ticked, but can be accessed.
*/
- protected final AtomicReference live = new AtomicReference<>(new SpoutChunk[CHUNKS.VOLUME]);
- protected volatile boolean chunksModified = false;
+ protected final AtomicReference live = new AtomicReference<>(new FlowChunk[CHUNKS.VOLUME]);
private final RegionSnapshot snapshot;
private final RenderThread render;
- public SpoutRegion(SpoutEngine engine, SpoutWorld world, int x, int y, int z, BAAWrapper chunkStore, RenderThread render) {
+ public FlowRegion(FlowEngine engine, FlowWorld world, int x, int y, int z, BAAWrapper chunkStore, RenderThread render) {
super(world, x << BLOCKS.BITS, y << BLOCKS.BITS, z << BLOCKS.BITS);
this.engine = engine;
this.generator = new RegionGenerator(this, 4);
@@ -109,7 +131,7 @@ public boolean isLoaded() {
throw new UnsupportedOperationException("Not supported yet.");
}
- protected void checkChunkLoaded(SpoutChunk chunk, LoadOption loadopt) {
+ protected void checkChunkLoaded(FlowChunk chunk, LoadOption loadopt) {
if (loadopt.loadIfNeeded()) {
//if (!chunk.cancelUnload()) {
// throw new IllegalStateException("Unloaded chunk returned by getChunk");
@@ -118,7 +140,7 @@ protected void checkChunkLoaded(SpoutChunk chunk, LoadOption loadopt) {
}
@Override
- public SpoutChunk getChunk(final int x, final int y, final int z, final LoadOption loadopt) {
+ public FlowChunk getChunk(final int x, final int y, final int z, final LoadOption loadopt) {
// If we're not waiting, then we don't care because it's async anyways
if (loadopt.isWait()) {
if (loadopt.generateIfNeeded()) {
@@ -132,7 +154,7 @@ public SpoutChunk getChunk(final int x, final int y, final int z, final LoadOpti
final int localY = y & CHUNKS.MASK;
final int localZ = z & CHUNKS.MASK;
- final SpoutChunk chunk = chunks.get()[getChunkIndex(localX, localY, localZ)];
+ final FlowChunk chunk = chunks.get()[getChunkIndex(localX, localY, localZ)];
if (chunk != null) {
checkChunkLoaded(chunk, loadopt);
return chunk;
@@ -157,11 +179,11 @@ public void run() {
// If loadopt.isWait(), this method is run synchronously and so is any further generation
// If !loadopt.isWait(), this method is run by a runnable, because the loading is taxing; any further generation is also run in its own Runnable
- private SpoutChunk loadOrGenChunkImmediately(int worldX, int worldY, int worldZ, final LoadOption loadopt) {
+ private FlowChunk loadOrGenChunkImmediately(int worldX, int worldY, int worldZ, final LoadOption loadopt) {
final int localX = worldX & CHUNKS.MASK;
final int localY = worldY & CHUNKS.MASK;
final int localZ = worldZ & CHUNKS.MASK;
- SpoutChunk newChunk = loadopt.loadIfNeeded() ? loadChunk(localX, localY, localZ) : null;
+ FlowChunk newChunk = loadopt.loadIfNeeded() ? loadChunk(localX, localY, localZ) : null;
if (newChunk != null || !loadopt.generateIfNeeded()) {
return newChunk;
@@ -171,36 +193,36 @@ private SpoutChunk loadOrGenChunkImmediately(int worldX, int worldY, int worldZ,
if (!loadopt.isWait()) {
return null;
}
- final SpoutChunk generatedChunk = live.get()[getChunkIndex(localX, localY, localZ)];
+ final FlowChunk generatedChunk = live.get()[getChunkIndex(localX, localY, localZ)];
if (generatedChunk != null) {
checkChunkLoaded(generatedChunk, loadopt);
return generatedChunk;
}
- Spout.getLogger().severe("Chunk failed to generate! (" + loadopt + ")");
- Spout.getLogger().info("Region " + this + ", chunk " + worldX + ", " + worldY + ", " + worldZ);
+ Flow.getLogger().severe("Chunk failed to generate! (" + loadopt + ")");
+ Flow.getLogger().info("Region " + this + ", chunk " + worldX + ", " + worldY + ", " + worldZ);
Thread.dumpStack();
return null;
}
- private SpoutChunk loadChunk(int x, int y, int z) {
+ private FlowChunk loadChunk(int x, int y, int z) {
final InputStream stream = this.getChunkInputStream(x, y, z);
if (stream != null) {
try {
try {
ChunkDataForRegion dataForRegion = new ChunkDataForRegion();
- SpoutChunk newChunk = ChunkFiles.loadChunk(this, x, y, z, stream, dataForRegion);
+ FlowChunk newChunk = ChunkFiles.loadChunk(this, x, y, z, stream, dataForRegion);
if (newChunk == null) {
- Spout.getLogger().severe("Unable to load chunk at location " + (getChunkX() + x) + ", " + (getChunkY() + y) + ", " + (getChunkZ() + z) + " in region " + this + ", regenerating chunks");
+ Flow.getLogger().severe("Unable to load chunk at location " + (getChunkX() + x) + ", " + (getChunkY() + y) + ", " + (getChunkZ() + z) + " in region " + this + ", regenerating chunks");
return null;
}
- SpoutChunk c = setChunk(newChunk, x, y, z, dataForRegion);
+ FlowChunk c = setChunk(newChunk, x, y, z, dataForRegion);
checkChunkLoaded(c, LoadOption.LOAD_ONLY);
return c;
} finally {
stream.close();
}
} catch (IOException e) {
- Spout.getLogger().log(Level.WARNING, "IOException when loading chunk!", e);
+ Flow.getLogger().log(Level.WARNING, "IOException when loading chunk!", e);
}
}
return null;
@@ -229,10 +251,10 @@ public static int getChunkKey(int chunkX, int chunkY, int chunkZ) {
return key;
}
- protected void setGeneratedChunks(SpoutChunk[][][] newChunks, int baseX, int baseY, int baseZ) {
+ protected void setGeneratedChunks(FlowChunk[][][] newChunks, int baseX, int baseY, int baseZ) {
while(true) {
- SpoutChunk[] live = this.live.get();
- SpoutChunk[] newArray = Arrays.copyOf(live, live.length);
+ FlowChunk[] live = this.live.get();
+ FlowChunk[] newArray = Arrays.copyOf(live, live.length);
final int width = newChunks.length;
for (int x = 0; x < width; x++) {
for (int z = 0; z < width; z++) {
@@ -246,29 +268,27 @@ protected void setGeneratedChunks(SpoutChunk[][][] newChunks, int baseX, int bas
}
}
if (this.live.compareAndSet(live, newArray)) {
- chunksModified = true;
//newChunk.queueNew();
break;
}
}
}
- protected SpoutChunk setChunk(SpoutChunk newChunk, int x, int y, int z, ChunkDataForRegion dataForRegion) {
+ protected FlowChunk setChunk(FlowChunk newChunk, int x, int y, int z, ChunkDataForRegion dataForRegion) {
final int chunkIndex = getChunkIndex(x, y, z);
while (true) {
- SpoutChunk[] live = this.live.get();
- SpoutChunk old = live[chunkIndex];
+ FlowChunk[] live = this.live.get();
+ FlowChunk old = live[chunkIndex];
if (old != null) {
//newChunk.setUnloadedUnchecked();
return old;
}
- SpoutChunk[] newArray = Arrays.copyOf(live, live.length);
+ FlowChunk[] newArray = Arrays.copyOf(live, live.length);
newArray[chunkIndex] = newChunk;
if (this.live.compareAndSet(live, newArray)) {
- chunksModified = true;
if (dataForRegion != null) {
- for (SpoutEntitySnapshot snapshot : dataForRegion.loadedEntities) {
- SpoutEntity entity = EntityManager.createEntity(snapshot.getTransform());
+ for (FlowEntitySnapshot snapshot : dataForRegion.loadedEntities) {
+ FlowEntity entity = EntityManager.createEntity(snapshot.getTransform());
entityManager.addEntity(entity);
}
}
@@ -473,12 +493,8 @@ public void preSnapshotRun() {
@Override
public void copySnapshotRun(int sequence) {
entityManager.copyAllSnapshots();
- if (chunksModified) {
- chunks.set(live.get());
- snapshot.update(this);
- chunksModified = false;
- }
-
+ chunks.set(live.get());
+ snapshot.update(this);
}
@Override
@@ -538,12 +554,12 @@ protected static int getChunkIndex(int x, int y, int z) {
}
@Override
- public SpoutWorld getWorld() {
- return (SpoutWorld) super.getWorld();
+ public FlowWorld getWorld() {
+ return (FlowWorld) super.getWorld();
}
- public SpoutChunk[] getChunks() {
- SpoutChunk[] get = chunks.get();
+ public FlowChunk[] getChunks() {
+ FlowChunk[] get = chunks.get();
return Arrays.copyOf(get, get.length);
}
diff --git a/src/main/java/com/flowpowered/engine/geo/region/RegionFileManager.java b/src/main/java/com/flowpowered/engine/geo/region/RegionFileManager.java
index 8aaea68..021d02b 100644
--- a/src/main/java/com/flowpowered/engine/geo/region/RegionFileManager.java
+++ b/src/main/java/com/flowpowered/engine/geo/region/RegionFileManager.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.geo.region;
@@ -30,7 +27,7 @@
import java.io.OutputStream;
import java.util.concurrent.ConcurrentHashMap;
-import com.flowpowered.api.Spout;
+import com.flowpowered.api.Flow;
import com.flowpowered.api.geo.cuboid.ChunkSnapshot;
import com.flowpowered.api.geo.cuboid.Region;
import com.flowpowered.api.io.bytearrayarray.BAAWrapper;
@@ -66,7 +63,7 @@ public BAAWrapper getBAAWrapper(int rx, int ry, int rz) {
return regionFile;
}
File file = new File(regionDirectory, filename);
- regionFile = new BAAWrapper(file, SEGMENT_SIZE, SpoutRegion.CHUNKS.VOLUME, TIMEOUT);
+ regionFile = new BAAWrapper(file, SEGMENT_SIZE, FlowRegion.CHUNKS.VOLUME, TIMEOUT);
BAAWrapper oldRegionFile = cache.putIfAbsent(filename, regionFile);
if (oldRegionFile != null) {
return oldRegionFile;
@@ -84,7 +81,7 @@ public OutputStream getChunkOutputStream(ChunkSnapshot c) {
int rx = c.getX() >> Region.CHUNKS.BITS;
int ry = c.getY() >> Region.CHUNKS.BITS;
int rz = c.getZ() >> Region.CHUNKS.BITS;
- return getBAAWrapper(rx, ry, rz).getBlockOutputStream(SpoutRegion.getChunkKey(c.getX(), c.getY(), c.getZ()));
+ return getBAAWrapper(rx, ry, rz).getBlockOutputStream(FlowRegion.getChunkKey(c.getX(), c.getY(), c.getZ()));
}
public void stopTimeoutThread() {
@@ -96,11 +93,11 @@ public void closeAll() {
try {
timeoutThread.join();
} catch (InterruptedException ie) {
- Spout.getLogger().info("Interrupted when trying to stop RegionFileManager timeout thread");
+ Flow.getLogger().info("Interrupted when trying to stop RegionFileManager timeout thread");
}
for (BAAWrapper regionFile : cache.values()) {
if (!regionFile.attemptClose()) {
- Spout.getLogger().info("Unable to close region file " + regionFile.getFilename());
+ Flow.getLogger().info("Unable to close region file " + regionFile.getFilename());
}
}
}
diff --git a/src/main/java/com/flowpowered/engine/geo/region/RegionGenerator.java b/src/main/java/com/flowpowered/engine/geo/region/RegionGenerator.java
index 563ca06..83a920a 100644
--- a/src/main/java/com/flowpowered/engine/geo/region/RegionGenerator.java
+++ b/src/main/java/com/flowpowered/engine/geo/region/RegionGenerator.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.geo.region;
@@ -36,19 +33,19 @@
import com.flowpowered.commons.Named;
import com.flowpowered.commons.store.block.impl.AtomicPaletteBlockStore;
-import com.flowpowered.api.Spout;
+import com.flowpowered.api.Flow;
import com.flowpowered.api.geo.cuboid.Chunk;
import com.flowpowered.api.geo.cuboid.Region;
import com.flowpowered.api.util.cuboid.CuboidBlockMaterialBuffer;
-import com.flowpowered.engine.geo.chunk.SpoutChunk;
-import com.flowpowered.engine.geo.world.SpoutServerWorld;
+import com.flowpowered.engine.geo.chunk.FlowChunk;
+import com.flowpowered.engine.geo.world.FlowServerWorld;
import com.flowpowered.engine.util.thread.LoggingThreadPoolExecutor;
import com.flowpowered.math.GenericMath;
public class RegionGenerator implements Named {
private final static ExecutorService pool = LoggingThreadPoolExecutor.newFixedThreadExecutorWithMarkedName(Runtime.getRuntime().availableProcessors() * 2 + 1, "RegionGenerator - async pool");
- private final SpoutRegion region;
- private final SpoutServerWorld world;
+ private final FlowRegion region;
+ private final FlowServerWorld world;
private final Lock[][][] sectionLocks;
private final AtomicReference[][][] generatedChunks;
private final int shift;
@@ -60,7 +57,7 @@ public class RegionGenerator implements Named {
private final int baseChunkZ;
@SuppressWarnings ("unchecked")
- public RegionGenerator(SpoutRegion region, int width) {
+ public RegionGenerator(FlowRegion region, int width) {
if (GenericMath.roundUpPow2(width) != width || width > Region.CHUNKS.SIZE || width < 0) {
throw new IllegalArgumentException("Width must be a power of 2 and can't be more than one region width");
}
@@ -83,7 +80,7 @@ public RegionGenerator(SpoutRegion region, int width) {
this.shift = GenericMath.multiplyToShift(width);
this.region = region;
- this.world = (SpoutServerWorld) region.getWorld();
+ this.world = (FlowServerWorld) region.getWorld();
this.baseChunkX = region.getChunkX();
this.baseChunkY = region.getChunkY();
this.baseChunkZ = region.getChunkZ();
@@ -145,7 +142,7 @@ private void generateChunk0(final int chunkXWorld, final int chunkYWorld, final
int generationIndex = generationCounter.getAndIncrement();
while (generationIndex == -1) {
- Spout.getLogger().info("Ran out of generation index ids, starting again");
+ Flow.getLogger().info("Ran out of generation index ids, starting again");
generationIndex = generationCounter.getAndIncrement();
}
@@ -160,7 +157,7 @@ private void generateChunk0(final int chunkXWorld, final int chunkYWorld, final
final CuboidBlockMaterialBuffer buffer = new CuboidBlockMaterialBuffer(chunkInWorldX << Chunk.BLOCKS.BITS, chunkInWorldY << Chunk.BLOCKS.BITS, chunkInWorldZ << Chunk.BLOCKS.BITS, Chunk.BLOCKS.SIZE << shift, Chunk.BLOCKS.SIZE << shift, Chunk.BLOCKS.SIZE << shift);
world.getGenerator().generate(buffer, world);
- SpoutChunk[][][] chunks = new SpoutChunk[width][width][width];
+ FlowChunk[][][] chunks = new FlowChunk[width][width][width];
for (int xx = 0; xx < width; xx++) {
chunkInWorldX = baseChunkX + chunkXLocal + xx;
for (int zz = 0; zz < width; zz++) {
@@ -169,7 +166,7 @@ private void generateChunk0(final int chunkXWorld, final int chunkYWorld, final
chunkInWorldY = baseChunkY + chunkYLocal + yy;
final CuboidBlockMaterialBuffer chunkBuffer = new CuboidBlockMaterialBuffer(chunkInWorldX << Chunk.BLOCKS.BITS, chunkInWorldY << Chunk.BLOCKS.BITS, chunkInWorldZ << Chunk.BLOCKS.BITS, Chunk.BLOCKS.SIZE, Chunk.BLOCKS.SIZE, Chunk.BLOCKS.SIZE);
chunkBuffer.write(buffer);
- SpoutChunk newChunk = new SpoutChunk(region, world, chunkInWorldX, chunkInWorldY, chunkInWorldZ, generationIndex, new AtomicPaletteBlockStore(Chunk.BLOCKS.BITS, true, true, 10, chunkBuffer.getRawId(), chunkBuffer.getRawData()));
+ FlowChunk newChunk = new FlowChunk(region, world, chunkInWorldX, chunkInWorldY, chunkInWorldZ, generationIndex, new AtomicPaletteBlockStore(Chunk.BLOCKS.BITS, true, true, 10, chunkBuffer.getRawId(), chunkBuffer.getRawData()));
chunks[xx][yy][zz] = newChunk;
}
@@ -204,7 +201,7 @@ public static void awaitExecutorServiceTermination() {
done = true;
break;
}
- Spout.getLogger().info("Waited 10 seconds for region generator pool to shutdown");
+ Flow.getLogger().info("Waited 10 seconds for region generator pool to shutdown");
} catch (InterruptedException e) {
interrupted = true;
}
diff --git a/src/main/java/com/flowpowered/engine/geo/region/RegionSource.java b/src/main/java/com/flowpowered/engine/geo/region/RegionSource.java
index dd8b90e..492fdf6 100644
--- a/src/main/java/com/flowpowered/engine/geo/region/RegionSource.java
+++ b/src/main/java/com/flowpowered/engine/geo/region/RegionSource.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.geo.region;
@@ -35,7 +32,7 @@
import com.flowpowered.commons.concurrent.TripleIntObjectMap;
import com.flowpowered.commons.concurrent.TripleIntObjectReferenceArrayMap;
-import com.flowpowered.api.Spout;
+import com.flowpowered.api.Flow;
import com.flowpowered.api.geo.LoadOption;
import com.flowpowered.api.geo.ServerWorld;
import com.flowpowered.api.geo.World;
@@ -43,9 +40,9 @@
import com.flowpowered.api.scheduler.TickStage;
import com.flowpowered.api.util.thread.annotation.DelayedWrite;
import com.flowpowered.api.util.thread.annotation.LiveRead;
-import com.flowpowered.engine.SpoutEngine;
-import com.flowpowered.engine.geo.world.SpoutServerWorld;
-import com.flowpowered.engine.geo.world.SpoutWorld;
+import com.flowpowered.engine.FlowEngine;
+import com.flowpowered.engine.geo.world.FlowServerWorld;
+import com.flowpowered.engine.geo.world.FlowWorld;
public class RegionSource implements Iterable {
private final static int REGION_MAP_BITS = 5;
@@ -53,21 +50,21 @@ public class RegionSource implements Iterable {
/**
* A map of loaded regions, mapped to their x and z values.
*/
- private final TripleIntObjectMap loadedRegions;
+ private final TripleIntObjectMap loadedRegions;
/**
* World associated with this region source
*/
- private final SpoutWorld world;
- private final SpoutEngine engine;
+ private final FlowWorld world;
+ private final FlowEngine engine;
- public RegionSource(SpoutEngine engine, SpoutWorld world) {
+ public RegionSource(FlowEngine engine, FlowWorld world) {
this.engine = engine;
this.world = world;
loadedRegions = new TripleIntObjectReferenceArrayMap<>(REGION_MAP_BITS);
}
@DelayedWrite
- public void removeRegion(final SpoutRegion r) {
+ public void removeRegion(final FlowRegion r) {
TickStage.checkStage(TickStage.SNAPSHOT);
if (!r.getWorld().equals(world)) {
@@ -76,11 +73,11 @@ public void removeRegion(final SpoutRegion r) {
/*
if (!r.isEmpty()) {
- Spout.getLogger().info("Region was not empty when attempting to remove, active chunks returns " + r.getNumLoadedChunks());
+ Flow.getLogger().info("Region was not empty when attempting to remove, active chunks returns " + r.getNumLoadedChunks());
return;
}
if (!r.attemptClose()) {
- Spout.getLogger().info("Unable to close region file, streams must be open");
+ Flow.getLogger().info("Unable to close region file, streams must be open");
return;
}
*/
@@ -89,14 +86,14 @@ public void removeRegion(final SpoutRegion r) {
int z = r.getZ();
boolean success = loadedRegions.remove(x, y, z, r);
if (!success) {
- Spout.getLogger().info("Tried to remove region " + r + " but region removal failed");
+ Flow.getLogger().info("Tried to remove region " + r + " but region removal failed");
return;
}
world.getEngine().getScheduler().removeAsyncManager(r);
if (regionsLoaded.decrementAndGet() < 0) {
- Spout.getLogger().info("Regions loaded dropped below zero");
+ Flow.getLogger().info("Regions loaded dropped below zero");
}
}
@@ -110,12 +107,12 @@ public void removeRegion(final SpoutRegion r) {
* @return region
*/
@LiveRead
- public SpoutRegion getRegion(int x, int y, int z, LoadOption loadopt) {
+ public FlowRegion getRegion(int x, int y, int z, LoadOption loadopt) {
if (loadopt != LoadOption.NO_LOAD) {
TickStage.checkStage(TickStage.noneOf(TickStage.SNAPSHOT));
}
- SpoutRegion region = loadedRegions.get(x, y, z);
+ FlowRegion region = loadedRegions.get(x, y, z);
if (region != null) {
return region;
@@ -125,9 +122,9 @@ public SpoutRegion getRegion(int x, int y, int z, LoadOption loadopt) {
return null;
}
- SpoutServerWorld serverWorld = (SpoutServerWorld) world;
- region = new SpoutRegion(engine, world, x, y, z, serverWorld.getRegionFile(x, y, z), engine.getPlatform().isClient() ? engine.getScheduler().getRenderThread() : null);
- SpoutRegion current = loadedRegions.putIfAbsent(x, y, z, region);
+ FlowServerWorld serverWorld = (FlowServerWorld) world;
+ region = new FlowRegion(engine, world, x, y, z, serverWorld.getRegionFile(x, y, z), engine.getPlatform().isClient() ? engine.getScheduler().getRenderThread() : null);
+ FlowRegion current = loadedRegions.putIfAbsent(x, y, z, region);
if (current != null) {
return current;
@@ -146,7 +143,7 @@ public SpoutRegion getRegion(int x, int y, int z, LoadOption loadopt) {
* @return true if exists, false if doesn't exist
*/
public static boolean regionFileExists(World world, int x, int y, int z) {
- if (!Spout.getPlatform(). isServer()) {
+ if (!Flow.getPlatform(). isServer()) {
return false;
}
File worldDirectory = ((ServerWorld) world).getDirectory();
diff --git a/src/main/java/com/flowpowered/engine/geo/snapshot/ChunkSnapshot.java b/src/main/java/com/flowpowered/engine/geo/snapshot/ChunkSnapshot.java
index d95f3c0..1b39aaa 100644
--- a/src/main/java/com/flowpowered/engine/geo/snapshot/ChunkSnapshot.java
+++ b/src/main/java/com/flowpowered/engine/geo/snapshot/ChunkSnapshot.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -35,7 +35,7 @@
import com.flowpowered.api.material.BlockMaterial;
import com.flowpowered.api.material.block.BlockFace;
import com.flowpowered.api.material.block.BlockFaces;
-import com.flowpowered.engine.geo.chunk.SpoutChunk;
+import com.flowpowered.engine.geo.chunk.FlowChunk;
/**
*
@@ -140,7 +140,7 @@ public long getUpdateNumber() {
* @param current The current chunk to update from
* @return Whether or not the snapshot state has changed
*/
- public boolean update(SpoutChunk current) {
+ public boolean update(FlowChunk current) {
if (!current.getBase().toInt().equals(base) || !current.getWorld().getUID().equals(world.getID())) {
throw new IllegalArgumentException("Cannot accept a chunk from another position or world");
}
diff --git a/src/main/java/com/flowpowered/engine/geo/snapshot/ChunkSnapshotGroup.java b/src/main/java/com/flowpowered/engine/geo/snapshot/ChunkSnapshotGroup.java
index a74c241..28e0395 100644
--- a/src/main/java/com/flowpowered/engine/geo/snapshot/ChunkSnapshotGroup.java
+++ b/src/main/java/com/flowpowered/engine/geo/snapshot/ChunkSnapshotGroup.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -55,24 +55,22 @@ public ChunkSnapshotGroup(ChunkSnapshot middle) {
}
/**
- * Returns the material at the position, looking at the directly neighbouring chunks if the position is outside the chunk. Will return {@link
- * org.spoutcraft.client.universe.block.material.Materials#AIR} if the neighbour is missing.
+ * Returns the material at the position, looking at the directly neighbouring chunks if the position is outside the chunk.
*
* @param position The position to lookup the material at
- * @return The material
+ * @return The material or null if missing
*/
public BlockMaterial getMaterial(Vector3i position) {
return getMaterial(position.getX(), position.getY(), position.getZ());
}
/**
- * Returns the material at the position, looking at the directly neighbouring chunks if the position is outside the chunk. Will return {@link
- * org.spoutcraft.client.universe.block.material.Materials#AIR} if the neighbour is missing.
+ * Returns the material at the position, looking at the directly neighbouring chunks if the position is outside the chunk.
*
* @param x The x coordinate of the position
* @param y The y coordinate of the position
* @param z The z coordinate of the position
- * @return The material
+ * @return The material or null if missing
*/
public BlockMaterial getMaterial(int x, int y, int z) {
if (x < 0) {
diff --git a/src/main/java/com/flowpowered/engine/geo/snapshot/RegionSnapshot.java b/src/main/java/com/flowpowered/engine/geo/snapshot/RegionSnapshot.java
index e073015..6dfcc14 100644
--- a/src/main/java/com/flowpowered/engine/geo/snapshot/RegionSnapshot.java
+++ b/src/main/java/com/flowpowered/engine/geo/snapshot/RegionSnapshot.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -29,8 +29,8 @@
import java.util.concurrent.locks.ReentrantReadWriteLock;
import com.flowpowered.api.geo.cuboid.Region;
-import com.flowpowered.engine.geo.chunk.SpoutChunk;
-import com.flowpowered.engine.geo.region.SpoutRegion;
+import com.flowpowered.engine.geo.chunk.FlowChunk;
+import com.flowpowered.engine.geo.region.FlowRegion;
import com.flowpowered.math.vector.Vector3i;
/**
@@ -60,7 +60,7 @@ public ChunkSnapshot getChunk(int x, int y, int z) {
final Lock lock = this.lock.readLock();
lock.lock();
try {
- return chunks[SpoutRegion.getChunkKey(x, y, z)];
+ return chunks[FlowRegion.getChunkKey(x, y, z)];
} finally {
lock.unlock();
}
@@ -86,7 +86,7 @@ public long getUpdateNumber() {
}
}
- public boolean update(SpoutRegion current) {
+ public boolean update(FlowRegion current) {
if (!current.getBase().toInt().equals(base)) {
throw new IllegalArgumentException("Cannot update from a region with another ID");
}
@@ -94,9 +94,9 @@ public boolean update(SpoutRegion current) {
lock.lock();
try {
boolean changed = false;
- SpoutChunk[] currentChunks = current.getChunks();
+ FlowChunk[] currentChunks = current.getChunks();
for (int i = 0; i < Region.CHUNKS.VOLUME; i++) {
- SpoutChunk currentChunk = currentChunks[i];
+ FlowChunk currentChunk = currentChunks[i];
ChunkSnapshot currentSnapshot = chunks[i];
if (currentChunk == null && currentSnapshot == null) {
continue;
diff --git a/src/main/java/com/flowpowered/engine/geo/snapshot/WorldSnapshot.java b/src/main/java/com/flowpowered/engine/geo/snapshot/WorldSnapshot.java
index e6321e3..9bf96d0 100644
--- a/src/main/java/com/flowpowered/engine/geo/snapshot/WorldSnapshot.java
+++ b/src/main/java/com/flowpowered/engine/geo/snapshot/WorldSnapshot.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -41,8 +41,8 @@
import com.flowpowered.api.geo.World;
import com.flowpowered.api.geo.cuboid.Region;
-import com.flowpowered.engine.geo.region.SpoutRegion;
-import com.flowpowered.engine.geo.world.SpoutWorld;
+import com.flowpowered.engine.geo.region.FlowRegion;
+import com.flowpowered.engine.geo.world.FlowWorld;
/**
*
@@ -150,7 +150,7 @@ public long getUpdateNumber() {
}
}
- public void update(SpoutWorld current) {
+ public void update(FlowWorld current) {
if (!current.getUID().equals(id)) {
throw new IllegalArgumentException("Cannot update from a world with another ID");
}
@@ -159,7 +159,7 @@ public void update(SpoutWorld current) {
try {
final Set validRegions = new HashSet<>();
boolean changed = false;
- for (SpoutRegion region : current.getSpoutRegions()) {
+ for (FlowRegion region : current.getFlowRegions()) {
final Vector3i base = region.getBase().toInt();
RegionSnapshot regionSnapshot = regions.get(base.getX(), base.getY(), base.getZ());
if (regionSnapshot == null) {
diff --git a/src/main/java/com/flowpowered/engine/geo/world/SpoutServerWorld.java b/src/main/java/com/flowpowered/engine/geo/world/FlowServerWorld.java
similarity index 60%
rename from src/main/java/com/flowpowered/engine/geo/world/SpoutServerWorld.java
rename to src/main/java/com/flowpowered/engine/geo/world/FlowServerWorld.java
index 1739af1..f911d5c 100644
--- a/src/main/java/com/flowpowered/engine/geo/world/SpoutServerWorld.java
+++ b/src/main/java/com/flowpowered/engine/geo/world/FlowServerWorld.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.geo.world;
import java.io.File;
@@ -10,14 +33,14 @@
import com.flowpowered.api.geo.discrete.Point;
import com.flowpowered.api.geo.discrete.Transform;
import com.flowpowered.api.io.bytearrayarray.BAAWrapper;
-import com.flowpowered.engine.SpoutEngine;
+import com.flowpowered.engine.FlowEngine;
import com.flowpowered.engine.filesystem.WorldFiles;
import com.flowpowered.engine.geo.region.RegionFileManager;
import com.flowpowered.math.imaginary.Quaternionf;
import com.flowpowered.math.vector.Vector3f;
-import com.flowpowered.engine.filesystem.SpoutFileSystem;
+import com.flowpowered.engine.filesystem.FlowFileSystem;
-public class SpoutServerWorld extends SpoutWorld implements ServerWorld {
+public class FlowServerWorld extends FlowWorld implements ServerWorld {
private final WorldGenerator generator;
private final long seed;
/**
@@ -29,20 +52,20 @@ public class SpoutServerWorld extends SpoutWorld implements ServerWorld {
*/
private final RegionFileManager regionFileManager;
- public SpoutServerWorld(SpoutEngine engine, String name, UUID uid, long age, WorldGenerator generator, long seed) {
+ public FlowServerWorld(FlowEngine engine, String name, UUID uid, long age, WorldGenerator generator, long seed) {
super(engine, name, uid, age);
this.spawnLocation = new Transform(new Point(this, 0, 0, 0), Quaternionf.IDENTITY, Vector3f.ONE);
this.generator = generator;
this.seed = seed;
- this.regionFileManager = new RegionFileManager(new File(SpoutFileSystem.WORLDS_DIRECTORY, name));
+ this.regionFileManager = new RegionFileManager(new File(FlowFileSystem.WORLDS_DIRECTORY, name));
}
- public SpoutServerWorld(SpoutEngine engine, String name, WorldGenerator generator) {
+ public FlowServerWorld(FlowEngine engine, String name, WorldGenerator generator) {
super(engine, name);
this.spawnLocation = new Transform(new Point(this, 0, 0, 0), Quaternionf.IDENTITY, Vector3f.ONE);
this.generator = generator;
this.seed = new Random().nextLong();
- this.regionFileManager = new RegionFileManager(new File(SpoutFileSystem.WORLDS_DIRECTORY, name));
+ this.regionFileManager = new RegionFileManager(new File(FlowFileSystem.WORLDS_DIRECTORY, name));
}
@Override
diff --git a/src/main/java/com/flowpowered/engine/geo/world/SpoutServerWorldManager.java b/src/main/java/com/flowpowered/engine/geo/world/FlowServerWorldManager.java
similarity index 59%
rename from src/main/java/com/flowpowered/engine/geo/world/SpoutServerWorldManager.java
rename to src/main/java/com/flowpowered/engine/geo/world/FlowServerWorldManager.java
index e12c906..2576127 100644
--- a/src/main/java/com/flowpowered/engine/geo/world/SpoutServerWorldManager.java
+++ b/src/main/java/com/flowpowered/engine/geo/world/FlowServerWorldManager.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.geo.world;
import java.io.File;
@@ -15,16 +38,16 @@
import com.flowpowered.api.geo.ServerWorld;
import com.flowpowered.api.geo.ServerWorldManager;
import com.flowpowered.api.geo.World;
-import com.flowpowered.engine.SpoutEngine;
-import com.flowpowered.engine.SpoutServer;
-import com.flowpowered.engine.filesystem.SpoutFileSystem;
+import com.flowpowered.engine.FlowEngine;
+import com.flowpowered.engine.FlowServer;
+import com.flowpowered.engine.filesystem.FlowFileSystem;
import com.flowpowered.engine.filesystem.WorldFiles;
-public class SpoutServerWorldManager extends SpoutWorldManager implements ServerWorldManager {
+public class FlowServerWorldManager extends FlowWorldManager implements ServerWorldManager {
private final WorldGenerator defaultGenerator = new EmptyWorldGenerator();
- public SpoutServerWorldManager(E engine) {
+ public FlowServerWorldManager(E engine) {
super(engine);
}
@@ -34,7 +57,7 @@ public Collection matchWorldFolder(String worldName) {
}
@Override
- public SpoutServerWorld loadWorld(String name, WorldGenerator generator) {
+ public FlowServerWorld loadWorld(String name, WorldGenerator generator) {
if (loadedWorlds.get().containsKey((name))) {
return loadedWorlds.get().get(name);
}
@@ -46,9 +69,9 @@ public SpoutServerWorld loadWorld(String name, WorldGenerator generator) {
generator = defaultGenerator;
}
- SpoutServerWorld world = WorldFiles.loadWorld((SpoutServer) engine, generator, name);
+ FlowServerWorld world = WorldFiles.loadWorld((FlowServer) engine, generator, name);
- SpoutServerWorld oldWorld = loadedWorlds.putIfAbsent(name, world);
+ FlowServerWorld oldWorld = loadedWorlds.putIfAbsent(name, world);
if (oldWorld != null) {
return oldWorld;
@@ -82,7 +105,7 @@ public List getWorldFolders() {
@Override
public File getWorldFolder() {
- return SpoutFileSystem.WORLDS_DIRECTORY;
+ return FlowFileSystem.WORLDS_DIRECTORY;
}
@Override
@@ -101,7 +124,7 @@ public boolean unloadWorld(ServerWorld world, boolean save) {
return false;
}
- SpoutServerWorld w = (SpoutServerWorld) world;
+ FlowServerWorld w = (FlowServerWorld) world;
boolean success = loadedWorlds.remove(world.getName(), w);
if (success) {
if (save) {
diff --git a/src/main/java/com/flowpowered/engine/geo/world/SpoutWorld.java b/src/main/java/com/flowpowered/engine/geo/world/FlowWorld.java
similarity index 82%
rename from src/main/java/com/flowpowered/engine/geo/world/SpoutWorld.java
rename to src/main/java/com/flowpowered/engine/geo/world/FlowWorld.java
index 1fd5df8..c4cc94c 100644
--- a/src/main/java/com/flowpowered/engine/geo/world/SpoutWorld.java
+++ b/src/main/java/com/flowpowered/engine/geo/world/FlowWorld.java
@@ -1,6 +1,29 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.geo.world;
-import com.flowpowered.engine.geo.region.SpoutRegion;
+import com.flowpowered.engine.geo.region.FlowRegion;
import java.util.Collection;
import java.util.List;
import java.util.UUID;
@@ -24,12 +47,12 @@
import com.flowpowered.api.scheduler.TaskManager;
import com.flowpowered.api.scheduler.TickStage;
import com.flowpowered.api.util.cuboid.CuboidBlockMaterialBuffer;
-import com.flowpowered.engine.SpoutEngine;
+import com.flowpowered.engine.FlowEngine;
import com.flowpowered.engine.entity.EntityManager;
-import com.flowpowered.engine.entity.SpoutEntity;
+import com.flowpowered.engine.entity.FlowEntity;
import com.flowpowered.engine.geo.region.RegionSource;
-import com.flowpowered.engine.geo.SpoutBlock;
-import com.flowpowered.engine.geo.chunk.SpoutChunk;
+import com.flowpowered.engine.geo.FlowBlock;
+import com.flowpowered.engine.geo.chunk.FlowChunk;
import com.flowpowered.engine.geo.snapshot.WorldSnapshot;
import com.flowpowered.engine.util.thread.CopySnapshotManager;
import com.flowpowered.engine.util.thread.snapshotable.SnapshotManager;
@@ -38,8 +61,8 @@
import com.flowpowered.math.imaginary.Quaternionf;
import com.flowpowered.math.vector.Vector3f;
-public class SpoutWorld extends BaseComponentOwner implements World, CopySnapshotManager {
- private final SpoutEngine engine;
+public class FlowWorld extends BaseComponentOwner implements World, CopySnapshotManager {
+ private final FlowEngine engine;
private final String name;
private final UUID uid;
private final SnapshotManager snapshotManager;
@@ -47,17 +70,17 @@ public class SpoutWorld extends BaseComponentOwner implements World, CopySnapsho
private final RegionSource regionSource;
private final WorldSnapshot snapshot;
- public SpoutWorld(SpoutEngine engine, String name, UUID uid, long age) {
+ public FlowWorld(FlowEngine engine, String name, UUID uid, long age) {
this.engine = engine;
this.name = name;
this.uid = uid;
this.snapshotManager = new SnapshotManager();
this.age = new SnapshotableLong(snapshotManager, age);
- this.regionSource = new RegionSource(engine, (SpoutServerWorld) this);
+ this.regionSource = new RegionSource(engine, (FlowServerWorld) this);
this.snapshot = new WorldSnapshot(this);
}
- public SpoutWorld(SpoutEngine engine, String name) {
+ public FlowWorld(FlowEngine engine, String name) {
this(engine, name, UUID.randomUUID(), 0);
}
@@ -89,12 +112,12 @@ public Entity spawnEntity(Vector3f point, LoadOption option, EntityPrefab prefab
@Override
public Entity spawnEntity(Vector3f point, LoadOption option, Class extends Component>... classes) {
- SpoutRegion region = (SpoutRegion) getRegionFromBlock(point, option);
+ FlowRegion region = (FlowRegion) getRegionFromBlock(point, option);
if (region == null) {
return null;
}
- SpoutEntity entity = EntityManager.createEntity(new Transform(new Point(point, this), Quaternionf.fromAxesAnglesDeg(0, 0, 0), Vector3f.ONE));
+ FlowEntity entity = EntityManager.createEntity(new Transform(new Point(point, this), Quaternionf.fromAxesAnglesDeg(0, 0, 0), Vector3f.ONE));
region.getEntityManager().addEntity(entity);
return entity;
}
@@ -109,7 +132,7 @@ public Entity[] spawnEntities(Vector3f[] points, LoadOption option, Class exte
}
@Override
- public SpoutEngine getEngine() {
+ public FlowEngine getEngine() {
return engine;
}
@@ -228,27 +251,27 @@ public Collection getRegions() {
return regionSource.getRegions();
}
- public Collection getSpoutRegions() {
+ public Collection getFlowRegions() {
return (Collection) getRegions();
}
@Override
- public SpoutRegion getRegion(int x, int y, int z, LoadOption loadopt) {
+ public FlowRegion getRegion(int x, int y, int z, LoadOption loadopt) {
return regionSource.getRegion(x, y, z, loadopt);
}
@Override
- public SpoutRegion getRegionFromChunk(int x, int y, int z, LoadOption loadopt) {
+ public FlowRegion getRegionFromChunk(int x, int y, int z, LoadOption loadopt) {
return getRegion(x >> Region.CHUNKS.BITS, y >> Region.CHUNKS.BITS, z >> Region.CHUNKS.BITS, loadopt);
}
@Override
- public SpoutRegion getRegionFromBlock(int x, int y, int z, LoadOption loadopt) {
+ public FlowRegion getRegionFromBlock(int x, int y, int z, LoadOption loadopt) {
return getRegion(x >> Region.BLOCKS.BITS, y >> Region.BLOCKS.BITS, z >> Region.BLOCKS.BITS, loadopt);
}
@Override
- public SpoutRegion getRegionFromBlock(Vector3f position, LoadOption loadopt) {
+ public FlowRegion getRegionFromBlock(Vector3f position, LoadOption loadopt) {
return getRegionFromBlock(position.getFloorX(), position.getFloorY(), position.getFloorZ(), loadopt);
}
@@ -258,8 +281,8 @@ public boolean containsChunk(int x, int y, int z) {
}
@Override
- public SpoutChunk getChunk(int x, int y, int z, LoadOption loadopt) {
- SpoutRegion region = getRegionFromChunk(x, y, z, loadopt);
+ public FlowChunk getChunk(int x, int y, int z, LoadOption loadopt) {
+ FlowRegion region = getRegionFromChunk(x, y, z, loadopt);
if (region == null) {
return null;
}
@@ -360,17 +383,17 @@ public boolean containsBlock(int x, int y, int z) {
}
@Override
- public SpoutBlock getBlock(int x, int y, int z) {
- return new SpoutBlock(this, x, y, z);
+ public FlowBlock getBlock(int x, int y, int z) {
+ return new FlowBlock(this, x, y, z);
}
@Override
- public SpoutBlock getBlock(float x, float y, float z) {
+ public FlowBlock getBlock(float x, float y, float z) {
return this.getBlock(GenericMath.floor(x), GenericMath.floor(y), GenericMath.floor(z));
}
@Override
- public SpoutBlock getBlock(Vector3f position) {
+ public FlowBlock getBlock(Vector3f position) {
return this.getBlock(position.getX(), position.getY(), position.getZ());
}
diff --git a/src/main/java/com/flowpowered/engine/geo/world/FlowWorldManager.java b/src/main/java/com/flowpowered/engine/geo/world/FlowWorldManager.java
new file mode 100644
index 0000000..db90afc
--- /dev/null
+++ b/src/main/java/com/flowpowered/engine/geo/world/FlowWorldManager.java
@@ -0,0 +1,88 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.flowpowered.engine.geo.world;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.UUID;
+
+import com.flowpowered.commons.StringUtil;
+
+import com.flowpowered.api.geo.World;
+import com.flowpowered.api.geo.WorldManager;
+import com.flowpowered.engine.FlowEngine;
+import com.flowpowered.engine.util.thread.snapshotable.SnapshotableLinkedHashMap;
+
+public class FlowWorldManager implements WorldManager {
+ protected final FlowEngine engine;
+ protected final SnapshotableLinkedHashMap loadedWorlds;
+
+ public FlowWorldManager(FlowEngine engine) {
+ loadedWorlds = new SnapshotableLinkedHashMap<>(engine.getSnapshotManager());
+ this.engine = engine;
+ }
+
+ @Override
+ public World getWorld(String name) {
+ return getWorld(name, true);
+ }
+
+ @Override
+ public World getWorld(String name, boolean exact) {
+ if (exact) {
+ FlowWorld world = loadedWorlds.get().get(name);
+ if (world != null) {
+ return world;
+ }
+ return loadedWorlds.get().get(name);
+ } else {
+ return StringUtil.getShortest(StringUtil.matchName(loadedWorlds.getValues(), name));
+ }
+ }
+
+ @Override
+ public Collection matchWorld(String name) {
+ return StringUtil.matchName(getWorlds(), name);
+ }
+
+ @Override
+ public FlowWorld getWorld(UUID uid) {
+ for (FlowWorld world : loadedWorlds.getValues()) {
+ if (world.getUID().equals(uid)) {
+ return world;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public Collection getWorlds() {
+ Collection w = new ArrayList<>();
+ for (FlowWorld world : loadedWorlds.getValues()) {
+ w.add(world);
+ }
+ return w;
+ }
+
+}
diff --git a/src/main/java/com/flowpowered/engine/geo/world/SpoutWorldManager.java b/src/main/java/com/flowpowered/engine/geo/world/SpoutWorldManager.java
deleted file mode 100644
index edd24ad..0000000
--- a/src/main/java/com/flowpowered/engine/geo/world/SpoutWorldManager.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package com.flowpowered.engine.geo.world;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.UUID;
-
-import com.flowpowered.commons.StringUtil;
-
-import com.flowpowered.api.geo.World;
-import com.flowpowered.api.geo.WorldManager;
-import com.flowpowered.engine.SpoutEngine;
-import com.flowpowered.engine.util.thread.snapshotable.SnapshotableLinkedHashMap;
-
-public class SpoutWorldManager implements WorldManager {
- protected final SpoutEngine engine;
- protected final SnapshotableLinkedHashMap loadedWorlds;
-
- public SpoutWorldManager(SpoutEngine engine) {
- loadedWorlds = new SnapshotableLinkedHashMap<>(engine.getSnapshotManager());
- this.engine = engine;
- }
-
- @Override
- public World getWorld(String name) {
- return getWorld(name, true);
- }
-
- @Override
- public World getWorld(String name, boolean exact) {
- if (exact) {
- SpoutWorld world = loadedWorlds.get().get(name);
- if (world != null) {
- return world;
- }
- return loadedWorlds.get().get(name);
- } else {
- return StringUtil.getShortest(StringUtil.matchName(loadedWorlds.getValues(), name));
- }
- }
-
- @Override
- public Collection matchWorld(String name) {
- return StringUtil.matchName(getWorlds(), name);
- }
-
- @Override
- public SpoutWorld getWorld(UUID uid) {
- for (SpoutWorld world : loadedWorlds.getValues()) {
- if (world.getUID().equals(uid)) {
- return world;
- }
- }
- return null;
- }
-
- @Override
- public Collection getWorlds() {
- Collection w = new ArrayList<>();
- for (SpoutWorld world : loadedWorlds.getValues()) {
- w.add(world);
- }
- return w;
- }
-
-}
diff --git a/src/main/java/com/flowpowered/engine/render/DeployNatives.java b/src/main/java/com/flowpowered/engine/render/DeployNatives.java
index e805855..3f82ef0 100644
--- a/src/main/java/com/flowpowered/engine/render/DeployNatives.java
+++ b/src/main/java/com/flowpowered/engine/render/DeployNatives.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.render;
import java.io.File;
diff --git a/src/main/java/com/flowpowered/engine/render/SpoutRenderer.java b/src/main/java/com/flowpowered/engine/render/FlowRenderer.java
similarity index 98%
rename from src/main/java/com/flowpowered/engine/render/SpoutRenderer.java
rename to src/main/java/com/flowpowered/engine/render/FlowRenderer.java
index c6f9b7c..b7cb009 100644
--- a/src/main/java/com/flowpowered/engine/render/SpoutRenderer.java
+++ b/src/main/java/com/flowpowered/engine/render/FlowRenderer.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -56,7 +56,7 @@
import com.flowpowered.engine.render.effect.SSAOEffect;
import com.flowpowered.engine.render.effect.ShadowMappingEffect;
import com.flowpowered.engine.scheduler.MainThread;
-import com.flowpowered.engine.scheduler.SpoutScheduler;
+import com.flowpowered.engine.scheduler.FlowScheduler;
import org.spout.renderer.api.Action.RenderModelsAction;
import org.spout.renderer.api.Camera;
import org.spout.renderer.api.GLImplementation;
@@ -99,7 +99,7 @@
* The default renderer. Support OpenGL 2.1 and 3.2. Can render fully textured models with normal and specular mapping, ambient occlusion (SSAO), shadow mapping, Phong shading, motion blur and edge
* detection anti-aliasing. The default OpenGL version is 3.2.
*/
-public class SpoutRenderer implements Renderer {
+public class FlowRenderer implements Renderer {
// CONSTANTS
private final String WINDOW_TITLE = "Spout";
private final Vector2f WINDOW_SIZE = new Vector2f(1200, 800);
@@ -162,7 +162,7 @@ public class SpoutRenderer implements Renderer {
private MainThread mainThread;
- public SpoutRenderer() {
+ public FlowRenderer() {
setGLVersion(GLVersion.GL32);
}
@@ -319,10 +319,10 @@ private void loadProgram(String name) {
final String shaderPath = "/shaders/" + glVersion.toString().toLowerCase() + "/" + name;
// SHADERS
final Shader vert = glFactory.createShader();
- vert.setSource(SpoutRenderer.class.getResourceAsStream(shaderPath + ".vert"));
+ vert.setSource(FlowRenderer.class.getResourceAsStream(shaderPath + ".vert"));
vert.create();
final Shader frag = glFactory.createShader();
- frag.setSource(SpoutRenderer.class.getResourceAsStream(shaderPath + ".frag"));
+ frag.setSource(FlowRenderer.class.getResourceAsStream(shaderPath + ".frag"));
frag.create();
// PROGRAM
final Program program = glFactory.createProgram();
@@ -738,7 +738,7 @@ private void addScreen() {
private void addHUD() {
final Font ubuntu;
try {
- ubuntu = Font.createFont(Font.TRUETYPE_FONT, SpoutRenderer.class.getResourceAsStream("/fonts/ubuntu-r.ttf"));
+ ubuntu = Font.createFont(Font.TRUETYPE_FONT, FlowRenderer.class.getResourceAsStream("/fonts/ubuntu-r.ttf"));
} catch (FontFormatException | IOException e) {
e.printStackTrace();
return;
@@ -778,7 +778,7 @@ public void render() {
inverseViewMatrixUniform.set(modelCamera.getViewMatrix().invert());
lightViewMatrixUniform.set(lightCamera.getViewMatrix());
lightProjectionMatrixUniform.set(lightCamera.getProjectionMatrix());
- blurStrengthUniform.set((float) fpsMonitor.getTPS() / SpoutScheduler.TARGET_FPS);
+ blurStrengthUniform.set((float) fpsMonitor.getTPS() / FlowScheduler.TARGET_FPS);
// RENDER
pipeline.run(context);
// UPDATE PREVIOUS FRAME UNIFORMS
diff --git a/src/main/java/com/flowpowered/engine/render/effect/BlurEffect.java b/src/main/java/com/flowpowered/engine/render/effect/BlurEffect.java
index c4c8775..49fbac9 100644
--- a/src/main/java/com/flowpowered/engine/render/effect/BlurEffect.java
+++ b/src/main/java/com/flowpowered/engine/render/effect/BlurEffect.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/src/main/java/com/flowpowered/engine/render/effect/SSAOEffect.java b/src/main/java/com/flowpowered/engine/render/effect/SSAOEffect.java
index 6245c6b..e147289 100644
--- a/src/main/java/com/flowpowered/engine/render/effect/SSAOEffect.java
+++ b/src/main/java/com/flowpowered/engine/render/effect/SSAOEffect.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/src/main/java/com/flowpowered/engine/render/effect/ShadowMappingEffect.java b/src/main/java/com/flowpowered/engine/render/effect/ShadowMappingEffect.java
index 0727329..631894d 100644
--- a/src/main/java/com/flowpowered/engine/render/effect/ShadowMappingEffect.java
+++ b/src/main/java/com/flowpowered/engine/render/effect/ShadowMappingEffect.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/src/main/java/com/flowpowered/engine/render/mesher/ParallelChunkMesher.java b/src/main/java/com/flowpowered/engine/render/mesher/ParallelChunkMesher.java
index 62a6abe..1a5f683 100644
--- a/src/main/java/com/flowpowered/engine/render/mesher/ParallelChunkMesher.java
+++ b/src/main/java/com/flowpowered/engine/render/mesher/ParallelChunkMesher.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -25,7 +25,6 @@
import java.util.concurrent.Callable;
import java.util.concurrent.ForkJoinPool;
-import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@@ -33,21 +32,20 @@
import com.flowpowered.api.model.mesh.Mesh;
import com.flowpowered.engine.geo.snapshot.ChunkSnapshot;
import com.flowpowered.engine.geo.snapshot.ChunkSnapshotGroup;
-import com.flowpowered.engine.render.SpoutRenderer;
+import com.flowpowered.engine.render.FlowRenderer;
import com.flowpowered.engine.render.model.ChunkModel;
-import com.flowpowered.engine.scheduler.MarkedNamedThreadFactory;
import com.flowpowered.engine.util.thread.LoggingThreadPoolExecutor;
import org.spout.renderer.api.data.VertexData;
/**
- * Meshes chunks in parallel. Returns chunk models which may not be rendered when {@link org.spoutcraft.client.nterface.mesh.ParallelChunkMesher.ChunkModel#render()} is called, this is happens when
+ * Meshes chunks in parallel. Returns chunk models which may not be rendered when {@link ParallelChunkMesher.ChunkModel#render()} is called, this is happens when
* the meshing is in progress. Parallelism is achieved using a {@link java.util.concurrent.ForkJoinPool} with default thread count. Chunks are meshed using the provided {@link
- * org.spoutcraft.client.nterface.mesh.ChunkMesher}. An optional {@link org.spoutcraft.client.nterface.Interface} can be passed to the constructor for chunk culling.
+ * ChunkMesher}.
*
- * @see org.spoutcraft.client.nterface.mesh.ParallelChunkMesher.ChunkModel
+ * @see ChunkModel
*/
public class ParallelChunkMesher {
- private final SpoutRenderer renderer;
+ private final FlowRenderer renderer;
private final ChunkMesher mesher;
private final ThreadPoolExecutor executor;
@@ -56,7 +54,7 @@ public class ParallelChunkMesher {
*
* @param mesher The chunk mesher
*/
- public ParallelChunkMesher(SpoutRenderer renderer, ChunkMesher mesher) {
+ public ParallelChunkMesher(FlowRenderer renderer, ChunkMesher mesher) {
this.renderer = renderer;
this.mesher = mesher;
this.executor = LoggingThreadPoolExecutor.newFixedThreadExecutorWithMarkedName(4, "ParallelChunkMesher");
diff --git a/src/main/java/com/flowpowered/engine/render/mesher/StandardChunkMesher.java b/src/main/java/com/flowpowered/engine/render/mesher/StandardChunkMesher.java
index 202067a..26d5866 100644
--- a/src/main/java/com/flowpowered/engine/render/mesher/StandardChunkMesher.java
+++ b/src/main/java/com/flowpowered/engine/render/mesher/StandardChunkMesher.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/src/main/java/com/flowpowered/engine/render/model/ChunkModel.java b/src/main/java/com/flowpowered/engine/render/model/ChunkModel.java
index 511ceb7..25caea1 100644
--- a/src/main/java/com/flowpowered/engine/render/model/ChunkModel.java
+++ b/src/main/java/com/flowpowered/engine/render/model/ChunkModel.java
@@ -1,28 +1,50 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.render.model;
import java.util.concurrent.Future;
import com.flowpowered.math.vector.Vector3i;
-import com.flowpowered.engine.render.SpoutRenderer;
+import com.flowpowered.engine.render.FlowRenderer;
import org.spout.renderer.api.data.VertexData;
import org.spout.renderer.api.gl.VertexArray;
import org.spout.renderer.api.model.Model;
/**
* In the case that meshing is occurring and that the chunk is not renderable, a previous model can be rendered instead. To use this feature, set the previous model using {@link
- * org.spoutcraft.client.nterface.mesh.ParallelChunkMesher.ChunkModel#setPrevious(org.spoutcraft.client.nterface.mesh.ParallelChunkMesher.ChunkModel)}. This previous model will be used until the mesh
+ * ParallelChunkMesher.ChunkModel#setPrevious(ParallelChunkMesher.ChunkModel)}. This previous model will be used until the mesh
* becomes available. At this point, the previous model will be destroyed, and the new one rendered. When a model isn't needed anymore, you must call {@link
- * org.spoutcraft.client.nterface.mesh.ParallelChunkMesher.ChunkModel#destroy()} to dispose of it completely. This will also cancel the meshing if it's in progress, and destroy the previous model. The
- * chunk can also be automatically culled by passing an optional {@link org.spoutcraft.client.nterface.Interface} to the {@link org.spoutcraft.client.nterface.mesh.ParallelChunkMesher} constructor.
+ * ParallelChunkMesher.ChunkModel#destroy()} to dispose of it completely. This will also cancel the meshing if it's in progress, and destroy the previous model.
*/
public class ChunkModel extends Model {
- private final SpoutRenderer renderer;
+ private final FlowRenderer renderer;
private volatile Future mesh;
private volatile boolean complete = false;
private ChunkModel previous;
- public ChunkModel(SpoutRenderer renderer, Vector3i position, Future mesh) {
+ public ChunkModel(FlowRenderer renderer, Vector3i position, Future mesh) {
this.renderer = renderer;
this.mesh = mesh;
// TODO: replace magic number
diff --git a/src/main/java/com/flowpowered/engine/scheduler/SpoutScheduler.java b/src/main/java/com/flowpowered/engine/scheduler/FlowScheduler.java
similarity index 79%
rename from src/main/java/com/flowpowered/engine/scheduler/SpoutScheduler.java
rename to src/main/java/com/flowpowered/engine/scheduler/FlowScheduler.java
index 3de3de5..c01f051 100644
--- a/src/main/java/com/flowpowered/engine/scheduler/SpoutScheduler.java
+++ b/src/main/java/com/flowpowered/engine/scheduler/FlowScheduler.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.scheduler;
@@ -41,7 +38,7 @@
import com.flowpowered.engine.util.thread.AsyncManager;
/**
- * A class which handles scheduling for the engine {@link SpoutTask}s.
Tasks can be submitted to the scheduler for execution by the main thread. These tasks are executed during a period where
+ * A class which handles scheduling for the engine {@link FlowTask}s.
Tasks can be submitted to the scheduler for execution by the main thread. These tasks are executed during a period where
* none of the auxiliary threads are executing.
Each tick consists of a number of stages. Each stage is executed in parallel, but the next stage is not started until all threads have
* completed the previous stage.
Except for executing queued serial tasks, all threads are run in parallel. The full sequence is as follows:
- Single Thread
- Execute
* queued tasks
Tasks that are submitted for execution are executed one at a time.
- Parallel Threads
- Stage 1
This is the first stage of execution. Most Events are
@@ -49,7 +46,7 @@
* this stage - entities are moved between entity managers. - chunks are compressed if necessary. - Pre-snapshot
This is a MONITOR stage, data is stable and no modifications are allowed.
* - Copy Snapshot
During this stage all live values are copied to their stable snapshot. Data is unstable so no reads are permitted during this stage.
*/
-public final class SpoutScheduler implements Scheduler {
+public final class FlowScheduler implements Scheduler {
/**
* The number of milliseconds between pulses.
*/
@@ -62,7 +59,7 @@ public final class SpoutScheduler implements Scheduler {
* Target Frames per Second for the renderer
*/
public static final int TARGET_FPS = 60;
- private final SpoutTaskManager taskManager;
+ private final FlowTaskManager taskManager;
// SchedulerElements
private final MainThread mainThread;
private final RenderThread renderThread;
@@ -71,7 +68,7 @@ public final class SpoutScheduler implements Scheduler {
/**
* Creates a new task scheduler.
*/
- public SpoutScheduler(Engine engine) {
+ public FlowScheduler(Engine engine) {
mainThread = new MainThread(this);
if (engine.getPlatform().isClient()) {
@@ -81,7 +78,7 @@ public SpoutScheduler(Engine engine) {
inputThread = null;
renderThread = null;
}
- taskManager = new SpoutTaskManager(this);
+ taskManager = new FlowTaskManager(this);
}
public void startMainThread() {
@@ -198,7 +195,7 @@ public long getUpTime() {
return taskManager.getUpTime();
}
- public SpoutTaskManager getTaskManager() {
+ public FlowTaskManager getTaskManager() {
return taskManager;
}
diff --git a/src/main/java/com/flowpowered/engine/scheduler/SpoutTask.java b/src/main/java/com/flowpowered/engine/scheduler/FlowTask.java
similarity index 81%
rename from src/main/java/com/flowpowered/engine/scheduler/SpoutTask.java
rename to src/main/java/com/flowpowered/engine/scheduler/FlowTask.java
index 5025430..f2d4d60 100644
--- a/src/main/java/com/flowpowered/engine/scheduler/SpoutTask.java
+++ b/src/main/java/com/flowpowered/engine/scheduler/FlowTask.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.scheduler;
@@ -41,7 +38,7 @@
/**
* Represents a task which is executed periodically.
*/
-public class SpoutTask implements Task, LongPrioritized {
+public class FlowTask implements Task, LongPrioritized {
/**
* The next task ID pending.
*/
@@ -103,7 +100,7 @@ public class SpoutTask implements Task, LongPrioritized {
/**
* Creates a new task with the specified period between consecutive calls to {@link #pulse()}.
*/
- public SpoutTask(TaskManager manager, Scheduler scheduler, Object owner, Runnable task, boolean sync, long delay, long period, TaskPriority priority, boolean longLife) {
+ public FlowTask(TaskManager manager, Scheduler scheduler, Object owner, Runnable task, boolean sync, long delay, long period, TaskPriority priority, boolean longLife) {
this.taskId = nextTaskId.getAndIncrement();
this.nextCallTime = new AtomicLong(manager.getUpTime() + delay);
this.executing = new AtomicBoolean(false);
@@ -187,7 +184,7 @@ boolean pulse() {
if (scheduler.isServerOverloaded()) {
if (attemptDefer()) {
- updateCallTime(SpoutScheduler.PULSE_EVERY);
+ updateCallTime(FlowScheduler.PULSE_EVERY);
return false;
}
}
@@ -273,8 +270,8 @@ public int hashCode() {
public boolean equals(Object o) {
if (o == this) {
return true;
- } else if (o instanceof SpoutTask) {
- SpoutTask other = (SpoutTask) o;
+ } else if (o instanceof FlowTask) {
+ FlowTask other = (FlowTask) o;
return other.taskId == taskId;
} else {
return false;
diff --git a/src/main/java/com/flowpowered/engine/scheduler/SpoutTaskManager.java b/src/main/java/com/flowpowered/engine/scheduler/FlowTaskManager.java
similarity index 66%
rename from src/main/java/com/flowpowered/engine/scheduler/SpoutTaskManager.java
rename to src/main/java/com/flowpowered/engine/scheduler/FlowTaskManager.java
index c47cc2b..636b329 100644
--- a/src/main/java/com/flowpowered/engine/scheduler/SpoutTaskManager.java
+++ b/src/main/java/com/flowpowered/engine/scheduler/FlowTaskManager.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.scheduler;
@@ -38,7 +35,7 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
-import com.flowpowered.api.Spout;
+import com.flowpowered.api.Flow;
import com.flowpowered.api.scheduler.Scheduler;
import com.flowpowered.api.scheduler.Task;
import com.flowpowered.api.scheduler.TaskManager;
@@ -46,9 +43,9 @@
import com.flowpowered.api.scheduler.Worker;
import com.flowpowered.engine.util.thread.AsyncManager;
-public class SpoutTaskManager implements TaskManager {
- private final ConcurrentHashMap activeWorkers = new ConcurrentHashMap<>();
- private final ConcurrentHashMap activeTasks = new ConcurrentHashMap<>();
+public class FlowTaskManager implements TaskManager {
+ private final ConcurrentHashMap activeWorkers = new ConcurrentHashMap<>();
+ private final ConcurrentHashMap activeTasks = new ConcurrentHashMap<>();
private final TaskPriorityQueue taskQueue;
private final AtomicBoolean alive;
private final AtomicLong upTime;
@@ -56,16 +53,16 @@ public class SpoutTaskManager implements TaskManager {
private final Scheduler scheduler;
private final ExecutorService pool = Executors.newFixedThreadPool(20, new MarkedNamedThreadFactory("Scheduler Thread Pool Thread", false));
- public SpoutTaskManager(Scheduler scheduler) {
+ public FlowTaskManager(Scheduler scheduler) {
this(scheduler, null, 0L);
}
- public SpoutTaskManager(Scheduler scheduler, AsyncManager manager) {
+ public FlowTaskManager(Scheduler scheduler, AsyncManager manager) {
this(scheduler, manager, 0L);
}
- public SpoutTaskManager(Scheduler scheduler, AsyncManager manager, long age) {
- this.taskQueue = new TaskPriorityQueue(manager, SpoutScheduler.PULSE_EVERY / 4);
+ public FlowTaskManager(Scheduler scheduler, AsyncManager manager, long age) {
+ this.taskQueue = new TaskPriorityQueue(manager, FlowScheduler.PULSE_EVERY / 4);
this.alive = new AtomicBoolean(true);
this.upTime = new AtomicLong(age);
this.scheduler = scheduler;
@@ -88,7 +85,7 @@ public Task scheduleSyncDelayedTask(Object plugin, Runnable task, long delay, Ta
@Override
public Task scheduleSyncRepeatingTask(Object plugin, Runnable task, long delay, long period, TaskPriority priority) {
- return schedule(new SpoutTask(this, scheduler, plugin, task, true, delay, period, priority, false));
+ return schedule(new FlowTask(this, scheduler, plugin, task, true, delay, period, priority, false));
}
@Override
@@ -111,7 +108,7 @@ public Task scheduleAsyncDelayedTask(Object plugin, Runnable task, long delay, T
if (!alive.get()) {
return null;
} else {
- return schedule(new SpoutTask(this, scheduler, plugin, task, false, delay, -1, priority, longLife));
+ return schedule(new FlowTask(this, scheduler, plugin, task, false, delay, -1, priority, longLife));
}
}
@@ -123,13 +120,13 @@ public Future callSyncMethod(Object plugin, Callable task, TaskPriorit
public void heartbeat(long delta) {
long upTime = this.upTime.addAndGet(delta);
- Queue q;
+ Queue q;
while ((q = taskQueue.poll(upTime)) != null) {
boolean checkRequired = !taskQueue.isFullyBelowThreshold(q, upTime);
- Iterator itr = q.iterator();
+ Iterator itr = q.iterator();
while (itr.hasNext()) {
- SpoutTask currentTask = itr.next();
+ FlowTask currentTask = itr.next();
if (checkRequired && currentTask.getPriority() > upTime) {
continue;
}
@@ -143,7 +140,7 @@ public void heartbeat(long delta) {
currentTask.pulse();
repeatSchedule(currentTask);
} else {
- Spout.getLogger().info("Async repeating task submitted");
+ Flow.getLogger().info("Async repeating task submitted");
}
}
if (taskQueue.complete(q, upTime)) {
@@ -152,7 +149,7 @@ public void heartbeat(long delta) {
}
}
- public void cancelTask(SpoutTask task) {
+ public void cancelTask(FlowTask task) {
if (task == null) {
throw new IllegalArgumentException("Task cannot be null!");
}
@@ -163,20 +160,20 @@ public void cancelTask(SpoutTask task) {
}
}
if (!task.isSync()) {
- SpoutWorker worker = activeWorkers.get(task);
+ FlowWorker worker = activeWorkers.get(task);
if (worker != null) {
worker.interrupt();
}
}
}
- public Task schedule(SpoutTask task) {
+ public Task schedule(FlowTask task) {
synchronized (scheduleLock) {
if (!addTask(task)) {
return task;
}
if (!task.isSync()) {
- SpoutWorker worker = new SpoutWorker(task, this);
+ FlowWorker worker = new FlowWorker(task, this);
addWorker(worker, task);
worker.start(pool);
} else {
@@ -186,7 +183,7 @@ public Task schedule(SpoutTask task) {
}
}
- protected Task repeatSchedule(SpoutTask task) {
+ protected Task repeatSchedule(FlowTask task) {
synchronized (scheduleLock) {
if (task.isAlive()) {
schedule(task);
@@ -197,15 +194,15 @@ protected Task repeatSchedule(SpoutTask task) {
return task;
}
- public void addWorker(SpoutWorker worker, SpoutTask task) {
+ public void addWorker(FlowWorker worker, FlowTask task) {
activeWorkers.put(task, worker);
}
- public boolean removeWorker(SpoutWorker worker, SpoutTask task) {
+ public boolean removeWorker(FlowWorker worker, FlowTask task) {
return activeWorkers.remove(task, worker);
}
- public boolean addTask(SpoutTask task) {
+ public boolean addTask(FlowTask task) {
activeTasks.put(task.getTaskId(), task);
if (!alive.get()) {
cancelTask(task);
@@ -214,7 +211,7 @@ public boolean addTask(SpoutTask task) {
return true;
}
- public boolean removeTask(SpoutTask task) {
+ public boolean removeTask(FlowTask task) {
return activeTasks.remove(task.getTaskId(), task);
}
@@ -238,8 +235,8 @@ public void cancelTask(Task task) {
@Override
public void cancelTasks(Object plugin) {
- ArrayList tasks = new ArrayList<>(activeTasks.values());
- for (SpoutTask task : tasks) {
+ ArrayList tasks = new ArrayList<>(activeTasks.values());
+ for (FlowTask task : tasks) {
if (task.getOwner() == plugin) {
cancelTask(task);
}
@@ -248,8 +245,8 @@ public void cancelTasks(Object plugin) {
@Override
public void cancelAllTasks() {
- ArrayList tasks = new ArrayList<>(activeTasks.values());
- for (SpoutTask task : tasks) {
+ ArrayList tasks = new ArrayList<>(activeTasks.values());
+ for (FlowTask task : tasks) {
cancelTask(task);
}
}
@@ -276,9 +273,9 @@ public boolean waitForAsyncTasks(long timeout) {
@Override
public List getPendingTasks() {
- List tasks = taskQueue.getTasks();
+ List tasks = taskQueue.getTasks();
List list = new ArrayList<>(tasks.size());
- for (SpoutTask t : tasks) {
+ for (FlowTask t : tasks) {
list.add(t);
}
return list;
diff --git a/src/main/java/com/flowpowered/engine/scheduler/SpoutWorker.java b/src/main/java/com/flowpowered/engine/scheduler/FlowWorker.java
similarity index 54%
rename from src/main/java/com/flowpowered/engine/scheduler/SpoutWorker.java
rename to src/main/java/com/flowpowered/engine/scheduler/FlowWorker.java
index b807898..e4b4fd8 100644
--- a/src/main/java/com/flowpowered/engine/scheduler/SpoutWorker.java
+++ b/src/main/java/com/flowpowered/engine/scheduler/FlowWorker.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.scheduler;
@@ -33,30 +30,30 @@
import com.flowpowered.api.scheduler.Worker;
import com.flowpowered.commons.future.SimpleFuture;
-public class SpoutWorker implements Worker, Runnable {
+public class FlowWorker implements Worker, Runnable {
@SuppressWarnings ("rawtypes")
private static final Future> NOT_SUBMITED = new SimpleFuture();
@SuppressWarnings ("rawtypes")
private static final Future> CANCELLED = new SimpleFuture();
private final int id;
private final Object owner;
- private final SpoutTask task;
+ private final FlowTask task;
private final Thread thread;
private final Runnable r;
private AtomicReference> futureRef = new AtomicReference>(NOT_SUBMITED);
private boolean shouldContinue = true;
- private final SpoutTaskManager taskManager;
+ private final FlowTaskManager taskManager;
- protected SpoutWorker(final SpoutTask task, final SpoutTaskManager taskManager) {
+ protected FlowWorker(final FlowTask task, final FlowTaskManager taskManager) {
id = task.getTaskId();
owner = task.getOwner();
this.task = task;
- String name = "Spout Worker{Owner:" + ((owner != null) ? owner.getClass().getName() : "none") + ", id:" + id + "}";
+ String name = "Flow Worker{Owner:" + ((owner != null) ? owner.getClass().getName() : "none") + ", id:" + id + "}";
r = new Runnable() {
@Override
public void run() {
task.pulse();
- taskManager.removeWorker(SpoutWorker.this, task);
+ taskManager.removeWorker(FlowWorker.this, task);
taskManager.repeatSchedule(task);
}
};
@@ -95,7 +92,7 @@ public Object getOwner() {
}
@Override
- public SpoutTask getTask() {
+ public FlowTask getTask() {
return task;
}
diff --git a/src/main/java/com/flowpowered/engine/scheduler/MainThread.java b/src/main/java/com/flowpowered/engine/scheduler/MainThread.java
index 0e7571f..b4d8668 100644
--- a/src/main/java/com/flowpowered/engine/scheduler/MainThread.java
+++ b/src/main/java/com/flowpowered/engine/scheduler/MainThread.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.scheduler;
import java.util.HashSet;
@@ -15,7 +38,7 @@
import com.flowpowered.commons.TPSMonitor;
import com.flowpowered.commons.ticking.TickingElement;
-import com.flowpowered.api.Spout;
+import com.flowpowered.api.Flow;
import com.flowpowered.api.scheduler.TickStage;
import com.flowpowered.api.scheduler.Worker;
import com.flowpowered.engine.geo.region.RegionGenerator;
@@ -34,7 +57,7 @@
import com.flowpowered.engine.util.thread.coretasks.StartTickTask;
public class MainThread extends TickingElement {
- private final SpoutScheduler scheduler;
+ private final FlowScheduler scheduler;
private final AtomicLong currentDelta = new AtomicLong(0);
private final ManagerRunnableFactory[] managerRunnableFactories = new ManagerRunnableFactory[] {
null,//TickStart has no ManagerRunnableFactory
@@ -71,11 +94,11 @@ public class MainThread extends TickingElement {
protected final ExecutorService executorService;
private final TPSMonitor tpsMonitor = new TPSMonitor();
- public MainThread(SpoutScheduler scheduler) {
+ public MainThread(FlowScheduler scheduler) {
super("MainThread", 20);
this.scheduler = scheduler;
final int nThreads = Runtime.getRuntime().availableProcessors() * 2 + 1;
- executorService = LoggingThreadPoolExecutor.newFixedThreadExecutorWithMarkedName(nThreads, "SpoutScheduler - AsyncManager executor service");
+ executorService = LoggingThreadPoolExecutor.newFixedThreadExecutorWithMarkedName(nThreads, "FlowScheduler - AsyncManager executor service");
}
@Override
@@ -89,7 +112,7 @@ public void onStop() {
RegionGenerator.shutdownExecutorService();
RegionGenerator.awaitExecutorServiceTermination();
- scheduler.getTaskManager().heartbeat(SpoutScheduler.PULSE_EVERY << 2);
+ scheduler.getTaskManager().heartbeat(FlowScheduler.PULSE_EVERY << 2);
scheduler.getTaskManager().shutdown(1L);
long delay = 2000;
@@ -98,10 +121,10 @@ public void onStop() {
if (workers.isEmpty()) {
break;
}
- Spout.info("Unable to shutdown due to async tasks still running");
+ Flow.info("Unable to shutdown due to async tasks still running");
for (Worker w : workers) {
Object owner = w.getOwner() instanceof Named ? ((Named) w.getOwner()).getName() : w.getOwner();
- Spout.info("Task with id of " + w.getTaskId() + " owned by " + owner + " is still running");
+ Flow.info("Task with id of " + w.getTaskId() + " owned by " + owner + " is still running");
}
if (delay < 8000) {
delay <<= 1;
@@ -158,7 +181,7 @@ public void onTick(long delta) {
}
if (totalUpdates >= UPDATE_THRESHOLD) {
- Spout.warn("Block updates per tick of " + totalUpdates + " exceeded the threshold " + UPDATE_THRESHOLD + "; " + dynamicUpdates + " dynamic updates, " + physicsUpdates + " block physics updates and " + lightUpdates + " lighting updates");
+ Flow.warn("Block updates per tick of " + totalUpdates + " exceeded the threshold " + UPDATE_THRESHOLD + "; " + dynamicUpdates + " dynamic updates, " + physicsUpdates + " block physics updates and " + lightUpdates + " lighting updates");
}
doFinalizeTick();
@@ -184,7 +207,7 @@ private void doDynamicUpdates() {
TickStage.setStage(TickStage.GLOBAL_DYNAMIC_BLOCKS);
- long earliestTime = SpoutScheduler.END_OF_THE_WORLD;
+ long earliestTime = FlowScheduler.END_OF_THE_WORLD;
for (AsyncManager e : managers) {
long firstTime = e.getFirstDynamicUpdateTime();
@@ -196,7 +219,7 @@ private void doDynamicUpdates() {
while (passStartUpdates < updates.get() && updates.get() < startUpdates + UPDATE_THRESHOLD) {
passStartUpdates = updates.get();
- long threshold = earliestTime + SpoutScheduler.PULSE_EVERY - 1;
+ long threshold = earliestTime + FlowScheduler.PULSE_EVERY - 1;
dynamicUpdatesTask.setThreshold(threshold);
@@ -239,15 +262,15 @@ public void run() {
try {
futures.get(i).get();
} catch (ExecutionException e) {
- Spout.warn("Exception thrown when executing a task in tick stage " + stage, e);
+ Flow.warn("Exception thrown when executing a task in tick stage " + stage, e);
} catch (InterruptedException e) {
- Spout.warn("Interrupted when getting future", e);
+ Flow.warn("Interrupted when getting future", e);
}
}
}
});
} catch (InterruptedException e) {
- Spout.warn("Main thread interrupted while waiting on tick stage " + stage);
+ Flow.warn("Main thread interrupted while waiting on tick stage " + stage);
}
}
}
diff --git a/src/main/java/com/flowpowered/engine/scheduler/MarkedNamedThreadFactory.java b/src/main/java/com/flowpowered/engine/scheduler/MarkedNamedThreadFactory.java
index fba51c8..58b84d4 100644
--- a/src/main/java/com/flowpowered/engine/scheduler/MarkedNamedThreadFactory.java
+++ b/src/main/java/com/flowpowered/engine/scheduler/MarkedNamedThreadFactory.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.scheduler;
import java.util.concurrent.ThreadFactory;
diff --git a/src/main/java/com/flowpowered/engine/scheduler/TaskPriorityQueue.java b/src/main/java/com/flowpowered/engine/scheduler/TaskPriorityQueue.java
index b25c2e2..9c48871 100644
--- a/src/main/java/com/flowpowered/engine/scheduler/TaskPriorityQueue.java
+++ b/src/main/java/com/flowpowered/engine/scheduler/TaskPriorityQueue.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.scheduler;
@@ -35,7 +32,7 @@
import com.flowpowered.api.util.concurrent.RedirectableConcurrentLinkedQueue;
import com.flowpowered.engine.util.thread.AsyncManager;
-public class TaskPriorityQueue extends ConcurrentLongPriorityQueue {
+public class TaskPriorityQueue extends ConcurrentLongPriorityQueue {
private final AsyncManager taskManager;
public TaskPriorityQueue(AsyncManager manager, long resolution) {
@@ -50,7 +47,7 @@ public TaskPriorityQueue(AsyncManager manager, long resolution) {
* @param currentTime the current time
* @return the first pending task, or null if no task is pending
*/
- public Queue getPendingTask(long currentTime) {
+ public Queue getPendingTask(long currentTime) {
if (Thread.currentThread() != taskManager.getExecutionThread()) {
throw new IllegalStateException("getPendingTask() may only be called from the thread that created the TaskPriorityQueue");
}
@@ -59,7 +56,7 @@ public Queue getPendingTask(long currentTime) {
}
@Override
- public boolean add(SpoutTask task) {
+ public boolean add(FlowTask task) {
if (task != null) {
if (!task.setQueued()) {
throw new UnsupportedOperationException("Task was dead when adding to the queue");
@@ -69,12 +66,12 @@ public boolean add(SpoutTask task) {
}
@Override
- public boolean redirect(SpoutTask task) {
+ public boolean redirect(FlowTask task) {
return super.add(task);
}
@Override
- public boolean remove(SpoutTask task) {
+ public boolean remove(FlowTask task) {
task.remove();
if (!super.remove(task)) {
return false;
@@ -89,7 +86,7 @@ public boolean remove(SpoutTask task) {
public String toString() {
StringBuilder sb = new StringBuilder("{");
boolean first = true;
- for (SpoutTask t : getTasks()) {
+ for (FlowTask t : getTasks()) {
if (first) {
first = false;
} else {
@@ -100,13 +97,13 @@ public String toString() {
return sb.append("}").toString();
}
- public List getTasks() {
- List list = new ArrayList<>();
- Iterator> iq = queueMap.values().iterator();
+ public List getTasks() {
+ List list = new ArrayList<>();
+ Iterator> iq = queueMap.values().iterator();
while (iq.hasNext()) {
- Iterator i = iq.next().iterator();
+ Iterator i = iq.next().iterator();
while (i.hasNext()) {
- SpoutTask t = i.next();
+ FlowTask t = i.next();
list.add(t);
}
}
diff --git a/src/main/java/com/flowpowered/engine/scheduler/input/InputThread.java b/src/main/java/com/flowpowered/engine/scheduler/input/InputThread.java
index 0158dbe..1e715e2 100644
--- a/src/main/java/com/flowpowered/engine/scheduler/input/InputThread.java
+++ b/src/main/java/com/flowpowered/engine/scheduler/input/InputThread.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -33,19 +33,19 @@
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;
-import com.flowpowered.engine.scheduler.SpoutScheduler;
+import com.flowpowered.engine.scheduler.FlowScheduler;
/**
*
*/
public class InputThread extends TickingElement {
private static final int TPS = 60;
- private final SpoutScheduler scheduler;
+ private final FlowScheduler scheduler;
private boolean mouseCreated = false, keyboardCreated = false;
private final SubscribableQueue keyboardQueue = new SubscribableQueue<>(false);
private final SubscribableQueue mouseQueue = new SubscribableQueue<>(false);
- public InputThread(SpoutScheduler scheduler) {
+ public InputThread(FlowScheduler scheduler) {
super("input", TPS);
this.scheduler = scheduler;
}
diff --git a/src/main/java/com/flowpowered/engine/scheduler/input/KeyboardEvent.java b/src/main/java/com/flowpowered/engine/scheduler/input/KeyboardEvent.java
index a020f6c..39774b9 100644
--- a/src/main/java/com/flowpowered/engine/scheduler/input/KeyboardEvent.java
+++ b/src/main/java/com/flowpowered/engine/scheduler/input/KeyboardEvent.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/src/main/java/com/flowpowered/engine/scheduler/input/MouseEvent.java b/src/main/java/com/flowpowered/engine/scheduler/input/MouseEvent.java
index fcc3060..3a6403c 100644
--- a/src/main/java/com/flowpowered/engine/scheduler/input/MouseEvent.java
+++ b/src/main/java/com/flowpowered/engine/scheduler/input/MouseEvent.java
@@ -1,7 +1,7 @@
-/**
- * This file is part of Client, licensed under the MIT License (MIT).
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2013 Spoutcraft
+ * Copyright (c) 2013 Spout LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/src/main/java/com/flowpowered/engine/scheduler/render/RenderThread.java b/src/main/java/com/flowpowered/engine/scheduler/render/RenderThread.java
index 634b243..f7f674a 100644
--- a/src/main/java/com/flowpowered/engine/scheduler/render/RenderThread.java
+++ b/src/main/java/com/flowpowered/engine/scheduler/render/RenderThread.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
package com.flowpowered.engine.scheduler.render;
import java.io.File;
@@ -26,16 +49,16 @@
import com.flowpowered.api.geo.discrete.Transform;
import com.flowpowered.api.material.block.BlockFace;
import com.flowpowered.api.material.block.BlockFaces;
-import com.flowpowered.engine.SpoutSingleplayer;
+import com.flowpowered.engine.FlowSingleplayer;
import com.flowpowered.engine.geo.snapshot.ChunkSnapshot;
import com.flowpowered.engine.geo.snapshot.RegionSnapshot;
import com.flowpowered.engine.geo.snapshot.WorldSnapshot;
-import com.flowpowered.engine.geo.world.SpoutWorld;
+import com.flowpowered.engine.geo.world.FlowWorld;
import com.flowpowered.engine.render.mesher.ParallelChunkMesher;
import com.flowpowered.engine.render.mesher.StandardChunkMesher;
-import com.flowpowered.engine.render.SpoutRenderer;
+import com.flowpowered.engine.render.FlowRenderer;
import com.flowpowered.engine.render.model.ChunkModel;
-import com.flowpowered.engine.scheduler.SpoutScheduler;
+import com.flowpowered.engine.scheduler.FlowScheduler;
import com.flowpowered.engine.scheduler.input.InputThread;
import com.flowpowered.engine.scheduler.input.KeyboardEvent;
import org.spout.renderer.api.Camera;
@@ -44,8 +67,8 @@
public class RenderThread extends TickingElement {
private final Client client;
- private final SpoutScheduler scheduler;
- private final SpoutRenderer renderer;
+ private final FlowScheduler scheduler;
+ private final FlowRenderer renderer;
private final InputThread input;
private final ParallelChunkMesher mesher;
// TEST CODE
@@ -53,11 +76,11 @@ public class RenderThread extends TickingElement {
private long worldLastUpdateNumber;
private final TObjectLongMap chunkLastUpdateNumbers = new TObjectLongHashMap<>();
- public RenderThread(Client client, SpoutScheduler scheduler) {
+ public RenderThread(Client client, FlowScheduler scheduler) {
super("RenderThread", 60);
this.client = client;
this.scheduler = scheduler;
- this.renderer = new SpoutRenderer();
+ this.renderer = new FlowRenderer();
this.input = scheduler.getInputThread();
this.mesher = new ParallelChunkMesher(renderer, new StandardChunkMesher());
}
@@ -66,7 +89,7 @@ public RenderThread(Client client, SpoutScheduler scheduler) {
public void onStart() {
renderer.setGLVersion(GLVersioned.GLVersion.GL30);
renderer.setSolidColor(new Color(0, 200, 0));
- renderer.init(((SpoutScheduler) client.getScheduler()).getMainThread());
+ renderer.init(((FlowScheduler) client.getScheduler()).getMainThread());
input.subscribeToKeyboard();
input.getKeyboardQueue().add(new KeyboardEvent(' ', Keyboard.KEY_ESCAPE, true, 1));
@@ -80,12 +103,12 @@ public void onStop() {
@Override
public void onTick(long dt) {
handleInput(dt / 1e9f);
- updateChunkModels(((SpoutWorld) client.getWorld()).getSnapshot());
+ updateChunkModels(((FlowWorld) client.getWorld()).getSnapshot());
updateLight(client.getWorld().getAge());
renderer.render();
}
- public SpoutRenderer getRenderer() {
+ public FlowRenderer getRenderer() {
return renderer;
}
@@ -232,7 +255,7 @@ private void handleInput(float dt) {
translation = translation.add(up.mul(-speed));
}
if (!translation.equals(Vector3f.ZERO)) {
- ((SpoutSingleplayer) client).getTestEntity().getPhysics().translate(translation);
+ ((FlowSingleplayer) client).getTestEntity().getPhysics().translate(translation);
camera.setPosition(camera.getPosition().add(translation));
}
}
diff --git a/src/main/java/com/flowpowered/engine/util/argument/EnumConverter.java b/src/main/java/com/flowpowered/engine/util/argument/EnumConverter.java
index 4d3eecc..8f85ce7 100644
--- a/src/main/java/com/flowpowered/engine/util/argument/EnumConverter.java
+++ b/src/main/java/com/flowpowered/engine/util/argument/EnumConverter.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.util.argument;
diff --git a/src/main/java/com/flowpowered/engine/util/argument/PlatformConverter.java b/src/main/java/com/flowpowered/engine/util/argument/PlatformConverter.java
index e656cac..b1d4db1 100644
--- a/src/main/java/com/flowpowered/engine/util/argument/PlatformConverter.java
+++ b/src/main/java/com/flowpowered/engine/util/argument/PlatformConverter.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.util.argument;
diff --git a/src/main/java/com/flowpowered/engine/util/math/ReactConverter.java b/src/main/java/com/flowpowered/engine/util/math/ReactConverter.java
index 7bf9227..392ef88 100644
--- a/src/main/java/com/flowpowered/engine/util/math/ReactConverter.java
+++ b/src/main/java/com/flowpowered/engine/util/math/ReactConverter.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.util.math;
@@ -33,37 +30,37 @@
import com.flowpowered.math.vector.Vector3f;
public class ReactConverter {
- //Spout -> React
- public static org.spout.physics.math.Vector3 toReactVector3(final Vector3f spoutVector3) {
- return new org.spout.physics.math.Vector3(spoutVector3.getX(), spoutVector3.getY(), spoutVector3.getZ());
+ //Flow -> React
+ public static org.spout.physics.math.Vector3 toReactVector3(final Vector3f flowVector3) {
+ return new org.spout.physics.math.Vector3(flowVector3.getX(), flowVector3.getY(), flowVector3.getZ());
}
public static org.spout.physics.math.Vector3 toReactVector3(final float x, final float y, final float z) {
return new org.spout.physics.math.Vector3(x, y, z);
}
- public static org.spout.physics.math.Quaternion toReactQuaternion(final Quaternionf spoutQuaternion) {
- return new org.spout.physics.math.Quaternion(spoutQuaternion.getX(), spoutQuaternion.getY(), spoutQuaternion.getZ(), spoutQuaternion.getW());
+ public static org.spout.physics.math.Quaternion toReactQuaternion(final Quaternionf flowQuaternion) {
+ return new org.spout.physics.math.Quaternion(flowQuaternion.getX(), flowQuaternion.getY(), flowQuaternion.getZ(), flowQuaternion.getW());
}
public static org.spout.physics.math.Quaternion toReactQuaternion(final float w, final float x, final float y, final float z) {
return new org.spout.physics.math.Quaternion(x, y, z, w);
}
- public static org.spout.physics.math.Transform toReactTransform(final Transform spoutTransform) {
- return new org.spout.physics.math.Transform(toReactVector3(spoutTransform.getPosition()), toReactQuaternion(spoutTransform.getRotation()));
+ public static org.spout.physics.math.Transform toReactTransform(final Transform flowTransform) {
+ return new org.spout.physics.math.Transform(toReactVector3(flowTransform.getPosition()), toReactQuaternion(flowTransform.getRotation()));
}
- //React -> Spout
- public static Vector3f toSpoutVector3(final org.spout.physics.math.Vector3 reactVector3) {
+ //React -> Flow
+ public static Vector3f toFlowVector3(final org.spout.physics.math.Vector3 reactVector3) {
return new Vector3f(reactVector3.getX(), reactVector3.getY(), reactVector3.getZ());
}
- public static Quaternionf toSpoutQuaternion(final org.spout.physics.math.Quaternion reactQuaternion) {
+ public static Quaternionf toFlowQuaternion(final org.spout.physics.math.Quaternion reactQuaternion) {
return new Quaternionf(reactQuaternion.getX(), reactQuaternion.getY(), reactQuaternion.getZ(), reactQuaternion.getW());
}
- public static Transform toSpoutTransform(final org.spout.physics.math.Transform reactTransform, final World world, final Vector3f scale) {
- return new Transform(new Point(toSpoutVector3(reactTransform.getPosition()), world), new Quaternionf(toSpoutQuaternion(reactTransform.getOrientation())), scale);
+ public static Transform toFlowTransform(final org.spout.physics.math.Transform reactTransform, final World world, final Vector3f scale) {
+ return new Transform(new Point(toFlowVector3(reactTransform.getPosition()), world), new Quaternionf(toFlowQuaternion(reactTransform.getOrientation())), scale);
}
}
\ No newline at end of file
diff --git a/src/main/java/com/flowpowered/engine/util/thread/AsyncExecutorUtils.java b/src/main/java/com/flowpowered/engine/util/thread/AsyncExecutorUtils.java
index d1d397f..4bd6904 100644
--- a/src/main/java/com/flowpowered/engine/util/thread/AsyncExecutorUtils.java
+++ b/src/main/java/com/flowpowered/engine/util/thread/AsyncExecutorUtils.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.util.thread;
@@ -34,7 +31,7 @@
import java.util.Map.Entry;
import java.util.logging.Logger;
-import com.flowpowered.api.Spout;
+import com.flowpowered.api.Flow;
public class AsyncExecutorUtils {
private static final String LINE = "------------------------------";
@@ -43,7 +40,7 @@ public class AsyncExecutorUtils {
* Logs all threads, the thread details, and active stack traces
*/
public static void dumpAllStacks() {
- Logger log = Spout.getLogger();
+ Logger log = Flow.getLogger();
Map traces = Thread.getAllStackTraces();
Iterator> i = traces.entrySet().iterator();
while (i.hasNext()) {
@@ -66,7 +63,7 @@ public static void dumpAllStacks() {
* Scans for deadlocked threads
*/
public static void checkForDeadlocks() {
- Logger log = Spout.getLogger();
+ Logger log = Flow.getLogger();
ThreadMXBean tmx = ManagementFactory.getThreadMXBean();
long[] ids = tmx.findDeadlockedThreads();
if (ids != null) {
@@ -86,9 +83,9 @@ public static void checkForDeadlocks() {
*/
public static void dumpStackTrace(Thread t) {
StackTraceElement[] stackTrace = t.getStackTrace();
- Spout.getLogger().info("Stack trace for Thread " + t.getName());
+ Flow.getLogger().info("Stack trace for Thread " + t.getName());
for (StackTraceElement e : stackTrace) {
- Spout.getLogger().info("\tat " + e);
+ Flow.getLogger().info("\tat " + e);
}
}
}
diff --git a/src/main/java/com/flowpowered/engine/util/thread/AsyncManager.java b/src/main/java/com/flowpowered/engine/util/thread/AsyncManager.java
index 2063034..39d2d39 100644
--- a/src/main/java/com/flowpowered/engine/util/thread/AsyncManager.java
+++ b/src/main/java/com/flowpowered/engine/util/thread/AsyncManager.java
@@ -1,28 +1,25 @@
/*
- * This file is part of Spout.
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
*
- * Copyright (c) 2011 Spout LLC
- * Spout is licensed under the Spout License Version 1.
+ * Copyright (c) 2013 Spout LLC
*
- * Spout is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * In addition, 180 days after any changes are published, you can use the
- * software, incorporating those changes, under the terms of the MIT license,
- * as described in the Spout License Version 1.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Spout is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Lesser General Public License,
- * the MIT license and the Spout License Version 1 along with this program.
- * If not, see for the GNU Lesser General Public
- * License and see for the full license, including
- * the MIT license.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package com.flowpowered.engine.util.thread;
diff --git a/src/main/java/com/flowpowered/engine/util/thread/CompleteAsyncManager.java b/src/main/java/com/flowpowered/engine/util/thread/CompleteAsyncManager.java
index 7ab1961..083010d 100644
--- a/src/main/java/com/flowpowered/engine/util/thread/CompleteAsyncManager.java
+++ b/src/main/java/com/flowpowered/engine/util/thread/CompleteAsyncManager.java
@@ -1,3 +1,26 @@
+/*
+ * This file is part of Flow Engine, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2013 Spout LLC