From ce5f8708cd6c867e7d4f5f9e6e5814ef872bcaa9 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sun, 8 Aug 2021 16:25:42 -0500 Subject: [PATCH] Remove unused code in LodNodeBuilder I don't think using a 3rd party generator is a good idea; even if it is much faster than vanilla MC. For a couple of reasons: 1. we could run into issues where the 3rd party isn't updated fast enough 2. the 3rd party generator may not generate the same terrain/biomes/etc. 3. we wouldn't be able to generate mod terrain --- .../seibel/lod/builders/LodNodeBuilder.java | 37 +++---------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/src/main/java/com/seibel/lod/builders/LodNodeBuilder.java b/src/main/java/com/seibel/lod/builders/LodNodeBuilder.java index 83f5b7a25..a0d95e05a 100644 --- a/src/main/java/com/seibel/lod/builders/LodNodeBuilder.java +++ b/src/main/java/com/seibel/lod/builders/LodNodeBuilder.java @@ -42,8 +42,6 @@ import net.minecraft.world.gen.Heightmap; public class LodNodeBuilder { private ExecutorService lodGenThreadPool = Executors.newSingleThreadExecutor(); - private long seed; - private DimensionType dimension; public static final int CHUNK_DATA_WIDTH = LodQuadTreeNode.CHUNK_WIDTH; public static final int CHUNK_SECTION_HEIGHT = CHUNK_DATA_WIDTH; @@ -53,36 +51,12 @@ public class LodNodeBuilder { * Default size of any LOD regions we use */ public int regionWidth = 5; + - - /** - * fast biome calculator - */ - //private BiomeSource biomeSource; - //Biome biome=biomeSource.getBiome(x,y,z); // here y is always 0 no matter what you pass - - public LodNodeBuilder() { - + public LodNodeBuilder() + { + } -/* - public setApproxGenerator(long seed){ - //Dimension.OVERWORLD; - //Dimension.END; - //Dimension.NETHER; - biomeSource = BiomeSource.of(Dimension.OVERWORLD ,MCVersion.v1_16_4, seed); - } - public void generateLodNodeAsync(List dataList){ - Thread thread = new Thread(() ->{ - for(LodNodeData data : dataList){ - - } - }); - thread.setPriority(4); - lodGenThreadPool.execute(thread); - - return; - } - */ public void generateLodNodeAsync(IChunk chunk, LodQuadTreeWorld lodWorld, IWorld world) { @@ -267,7 +241,8 @@ public class LodNodeBuilder { /** * Find the highest point from the Top */ - private short determineHeightPoint(Heightmap heightmap, + @SuppressWarnings("unused") + private short determineHeightPoint(Heightmap heightmap, int startX, int startZ, int endX, int endZ) { short highest = 0;