Fix destroyed state logging

This commit is contained in:
Stone_Red
2022-05-07 03:59:22 +02:00
parent 9670391019
commit 8331272918
2 changed files with 1 additions and 1 deletions
@@ -60,7 +60,6 @@ public class PlayerManager {
Entity oldEntity = chunk.getEntity(blockCoordinate);
if(oldEntity != null && oldEntity.getClass().getSimpleName() == entity.getClass().getSimpleName()) {
oldEntity.setData("destroyed", true);
entity.setRotation(oldEntity.getRotation() + 1);
}
@@ -45,6 +45,7 @@ public class Chunk extends GridPane {
public void removeEntity(Coordinate pos) {
Entity entity = getEntity(pos);
entity.setData("destroyed", true);
this.getChildren().remove(entity);
data[pos.x + pos.y * CHUNK_SIZE] = null;
}