diff --git a/test-plugin/src/main/kotlin/space/uranos/testplugin/TestPlugin.kt b/test-plugin/src/main/kotlin/space/uranos/testplugin/TestPlugin.kt index 6404d9e..74f8339 100644 --- a/test-plugin/src/main/kotlin/space/uranos/testplugin/TestPlugin.kt +++ b/test-plugin/src/main/kotlin/space/uranos/testplugin/TestPlugin.kt @@ -107,7 +107,7 @@ class TestPlugin : Plugin("Test", "1.0.0") { // Not showing up yet because no metadata is sent val entity = Uranos.create() entity.position = Position(0.0, 4.0, 0.0) - entity.setWorld(world) +// entity.setWorld(world) var x = 0f var y = -90f diff --git a/uranos-server/src/main/kotlin/space/uranos/entity/UranosEntity.kt b/uranos-server/src/main/kotlin/space/uranos/entity/UranosEntity.kt index 0eb2acd..8b3daf9 100644 --- a/uranos-server/src/main/kotlin/space/uranos/entity/UranosEntity.kt +++ b/uranos-server/src/main/kotlin/space/uranos/entity/UranosEntity.kt @@ -65,6 +65,8 @@ sealed class UranosEntity(server: UranosServer) : Entity { } } + override fun toString(): String = "Entity($uuid)" + abstract suspend fun tick() abstract val chunkKey: Chunk.Key @@ -79,6 +81,12 @@ sealed class UranosEntity(server: UranosServer) : Entity { addedViewers.clear() removedViewers.clear() } + + init { + if (server.config.developmentMode) server.scheduler.executeAfter(2) { + if (world == null) server.logger.warn("$this was created 2 ticks ago and its world is still null.") + } + } } sealed class UranosLivingEntity(server: UranosServer) : UranosEntity(server), LivingEntity {