From d4caa5984a914dbd9109f11f13a310adc24a45c7 Mon Sep 17 00:00:00 2001 From: Duckos-Mods <107327509+Duckos-Mods@users.noreply.github.com> Date: Thu, 1 Dec 2022 18:38:25 +0000 Subject: [PATCH] Fixed The Duplicated 0 X and 1 X Made The Chunks Smoother By Not Being Dumb When Making It lmao --- Main/Auto CTM.py | 43 +++++++++---------------------------------- 1 file changed, 9 insertions(+), 34 deletions(-) diff --git a/Main/Auto CTM.py b/Main/Auto CTM.py index a955165..7f24ec2 100644 --- a/Main/Auto CTM.py +++ b/Main/Auto CTM.py @@ -48,8 +48,6 @@ def CreateChunkStuff(X,Z): YAxisArray.append(int(CreatedNoisei)) - - for XSlide in range(LoopAmountOne): for ZSlide in range(LoopAmountTwo): X,Z = chunk_coords_to_block_coords(XSlide, ZSlide) @@ -59,24 +57,9 @@ def CreateChunkStuff(X,Z): YAxisArrayCreationTime = int(time.time() - Start) print("Created Y Axis Array!... It Took " + str(YAxisArrayCreationTime) + " Seconds") -print("Generating Empty Chunks!...") -Start = time.time() - -for ChunkScrollX in range(LoopAmountOne): - for ChunkScrollZ in range(LoopAmountTwo): - CreatedChunk = Chunk(ChunkScrollX, ChunkScrollZ) - level.put_chunk(CreatedChunk, "minecraft:overworld") - -CreatedChunk.changed = True -level.save() -EmptyingChunksTime = int(time.time() - Start) - -print("Generated Empty Chunks!... It Took " + str(EmptyingChunksTime) + " Seconds") print("Starting Main Generation loop!...") -IndexOfYArray = 0 -NegIndexOfYArray = -1 - +IndexOfYArray = 1 Start = time.time() for MainSlideX in range(LoopAmountOne): @@ -84,23 +67,15 @@ def CreateChunkStuff(X,Z): CreatedNewChunk = Chunk(MainSlideX, MainSlideZ) for X in range(16): for Z in range(16): - if Z == 0: - CreatedNewChunk.blocks[X, YAxisArray[IndexOfYArray + 1], Z] = GrassBlock - CreatedNewChunk.blocks[X, YAxisArray[IndexOfYArray + 1] - 1, Z] = DirtBlock - CreatedNewChunk.blocks[X, YAxisArray[IndexOfYArray + 1] - 2, Z] = DirtBlock - CreatedNewChunk.blocks[X, YAxisArray[IndexOfYArray + 1] - 3, Z] = StoneBlock - level.put_chunk(CreatedNewChunk, "minecraft:overworld") - IndexOfYArray += 1 - else: - CreatedNewChunk.blocks[X, YAxisArray[IndexOfYArray], Z] = GrassBlock - CreatedNewChunk.blocks[X, YAxisArray[IndexOfYArray] - 1, Z] = DirtBlock - CreatedNewChunk.blocks[X, YAxisArray[IndexOfYArray] - 2, Z] = DirtBlock - CreatedNewChunk.blocks[X, YAxisArray[IndexOfYArray] - 3, Z] = StoneBlock - level.put_chunk(CreatedNewChunk, "minecraft:overworld") - IndexOfYArray += 1 + CreatedNewChunk.blocks[X, YAxisArray[IndexOfYArray], Z] = GrassBlock + CreatedNewChunk.blocks[X, YAxisArray[IndexOfYArray] - 1, Z] = DirtBlock + CreatedNewChunk.blocks[X, YAxisArray[IndexOfYArray] - 2, Z] = DirtBlock + CreatedNewChunk.blocks[X, YAxisArray[IndexOfYArray] - 3, Z] = StoneBlock + level.put_chunk(CreatedNewChunk, "minecraft:overworld") + IndexOfYArray += 1 level.save() level.close() -print("Finished Main Generation Loop!... It Took " + str(int(time.time() - Start))) + " Seconds!" -print("In Total This Has Taken " + str(YAxisArrayCreationTime + EmptyingChunksTime + int(time.time() - Start)) + " Seconds") \ No newline at end of file +print("Finished Main Generation Loop!... It Took " + str(int(time.time() - Start)) + " Seconds!") +print("In Total This Has Taken " + str(int(YAxisArrayCreationTime + int(time.time() - Start))) + " Seconds")