Skip to content

Commit

Permalink
Fixed The Duplicated 0 X and 1 X
Browse files Browse the repository at this point in the history
Made The Chunks Smoother By Not Being Dumb When Making It lmao
  • Loading branch information
SaturnRoccat authored Dec 1, 2022
1 parent aa3e8c9 commit d4caa59
Showing 1 changed file with 9 additions and 34 deletions.
43 changes: 9 additions & 34 deletions Main/Auto CTM.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -59,48 +57,25 @@ 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):
for MainSlideZ in range(LoopAmountTwo):
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")
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")

1 comment on commit d4caa59

@SaturnRoccat
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be the last chunk bug patch for a hot minute lmao at least i fucking hope it is

Please sign in to comment.