mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-11 02:06:07 +00:00
Use Faster GlueList
Uses GlueList a faster List implementation. Drop in replacement for ArrayList. https://github.com/ertugrulcetin/GlueList
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.dfsek.terra.procgen;
|
||||
|
||||
import com.dfsek.terra.util.GlueList;
|
||||
import it.unimi.dsi.util.XoRoShiRo128PlusPlusRandom;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.polydev.gaea.math.MathUtil;
|
||||
@@ -31,7 +32,7 @@ public class GridSpawn {
|
||||
public Vector getNearestSpawn(int x, int z, long seed) {
|
||||
int structureChunkX = x / (width + 2 * separation);
|
||||
int structureChunkZ = z / (width + 2 * separation);
|
||||
List<Vector> zones = new ArrayList<>();
|
||||
List<Vector> zones = new GlueList<>();
|
||||
for(int xi = structureChunkX - 1; xi <= structureChunkX + 1; xi++) {
|
||||
for(int zi = structureChunkZ - 1; zi <= structureChunkZ + 1; zi++) {
|
||||
zones.add(getChunkSpawn(xi, zi, seed));
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.dfsek.terra.procgen.voxel;
|
||||
|
||||
import com.dfsek.terra.util.GlueList;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class VoxelGeometry {
|
||||
private final List<Vector> geometry = new ArrayList<>();
|
||||
private final List<Vector> geometry = new GlueList<>();
|
||||
|
||||
public static VoxelGeometry getBlank() {
|
||||
return new VoxelGeometry() {
|
||||
|
||||
Reference in New Issue
Block a user