New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#25 Chunks are not generated on 1.10.2 #36

Merged
merged 2 commits into from Nov 18, 2016
Jump to file or symbol
Failed to load files and symbols.
+6 −8
Diff settings

Always

Just for now

@@ -60,13 +60,11 @@ private static boolean chunkPrepared(ChunkProviderServer cps, int x, int z, int
public static void generateChunk(MinecraftServer server, int x, int z, int dimensionID) {
ChunkProviderServer cps = server.worldServerForDimension(dimensionID).getChunkProvider();
if(!chunkPrepared(cps, x, z, dimensionID)) {
cps.loadChunk(x, z);
cps.loadChunk(x, z+1);
cps.loadChunk(x+1, z);
cps.loadChunk(x+1, z+1);
cps.provideChunk(x, z).needsSaving(true);
cps.provideChunk(x, z+1).needsSaving(true);
cps.provideChunk(x+1, z).needsSaving(true);
cps.provideChunk(x+1, z+1).needsSaving(true);
}
}
@@ -123,7 +121,7 @@ public static int queueChunkGeneration(ICommandSender icommandsender, int skipCh
final Vec3d zerovec = new Vec3d(x, 0, z);
BiConsumer<Integer, Integer> addChunk = (xpos,zpos) -> {
//guard for range
if (zerovec.distanceTo(new Vec3d(xpos, 0, zpos)) <= radius) {
if (zerovec.distanceTo(new Vec3d(xpos, 0, zpos)) > radius) {
return;
}
Reference.toGenerate.add(new ChunkPosition(xpos, zpos, dimensionID, icommandsender, logToChat));
@@ -139,7 +137,7 @@ public static int queueChunkGeneration(ICommandSender icommandsender, int skipCh
BiConsumer<Integer, Integer> addChunk = (xpos,zpos) -> {
//guard for range
if (xpos > xmax || xpos < xmin
|| zpos > zmax || xpos < zmin) {
|| zpos > zmax || zpos < zmin) {
return;
}
Reference.toGenerate.add(new ChunkPosition(xpos, zpos, dimensionID, icommandsender, logToChat));
ProTip! Use n and p to navigate between commits in a pull request.