Remove markEdit and fix spawn chunk not loaded bug

This commit is contained in:
IntegratedQuantum 2019-03-26 18:48:33 +01:00
parent 0a91c172b2
commit 331f9b2a78
4 changed files with 1 additions and 54 deletions

View File

@ -12,21 +12,6 @@ import io.cubyz.entity.Player;
// TODO
public class RemoteWorld extends World {
@Override
public boolean isEdited() {
return false;
}
@Override
public void unmarkEdit() {
}
@Override
public void markEdit() {
}
@Override
public Player getLocalPlayer() {
return null;

View File

@ -119,7 +119,6 @@ public class Chunk {
inst = new BlockInstance[16][World.WORLD_HEIGHT][16];
}
inst[rx][y][rz] = inst0;
world.markEdit();
if(generated) {
BlockInstance[] neighbors = inst0.getNeighbors();
for (int i = 0; i < neighbors.length; i++) {
@ -203,7 +202,6 @@ public class Chunk {
updatables.add(bi);
}*/
}
world.markEdit();
}
}
@ -272,7 +270,6 @@ public class Chunk {
}
}
}
world.markEdit();
}
}
@ -352,7 +349,6 @@ public class Chunk {
}
}
}
world.markEdit();
inst[x][y][z] = null;
}
}

View File

@ -25,7 +25,6 @@ public class LocalWorld extends World {
//private List<BlockInstance> spatials = new ArrayList<>();
private Block [] blocks;
private boolean edited;
private Player player;
private WorldIO wio;
@ -87,21 +86,6 @@ public class LocalWorld extends World {
}
}
@Override
public boolean isEdited() {
return edited;
}
@Override
public void unmarkEdit() {
edited = false;
}
@Override
public void markEdit() {
edited = true;
}
public LocalWorld() {
name = "World";
chunks = new ArrayList<>();
@ -158,7 +142,7 @@ public class LocalWorld extends World {
Chunk ch = getChunk(x / 16, z / 16);
if (!ch.isGenerated()) {
synchronousGenerate(ch);
ch.setLoaded(true);
ch.load();
}
}

View File

@ -43,24 +43,6 @@ public abstract class World {
}
}
/**
* Used internally, allow the client to know whether or not it should update the visible blocks list.
* Mostly unused since recently.
*/
public abstract boolean isEdited();
/**
* Used internally, allow the client to know whether or not it should update the visible blocks list.
* Mostly unused since recently.
*/
public abstract void unmarkEdit();
/**
* Used internally, allow the client to know whether or not it should update the visible blocks list.
* Mostly unused since recently.
*/
public abstract void markEdit();
public abstract Player getLocalPlayer();
public int getHeight() {