diff --git a/build.gradle.kts b/build.gradle.kts index da21daf2..d8c94dbc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -55,7 +55,7 @@ val hytaleServer: Configuration by configurations.creating val patchedJar = rootDir.resolve("repo/applications/HytaleServerPatched.jar") dependencies { - hytaleServer("com.hypixel.hytale:Server:2026.02.17-255364b8e") + hytaleServer("com.hypixel.hytale:Server:2026.02.18-f3b8fff9") } configurations { diff --git a/generated/com/hypixel/hytale/builtin/adventure/memories/MemoriesPlugin.java b/generated/com/hypixel/hytale/builtin/adventure/memories/MemoriesPlugin.java index 410703f7..a79f16f5 100644 --- a/generated/com/hypixel/hytale/builtin/adventure/memories/MemoriesPlugin.java +++ b/generated/com/hypixel/hytale/builtin/adventure/memories/MemoriesPlugin.java @@ -128,15 +128,14 @@ public class MemoriesPlugin extends JavaPlugin { @Override protected void start() { - try { - Path path = Constants.UNIVERSE_PATH.resolve("memories.json"); - if (Files.exists(path)) { - this.recordedMemories = RawJsonReader.readSync(path, MemoriesPlugin.RecordedMemories.CODEC, this.getLogger()); - } else { + Path path = Constants.UNIVERSE_PATH.resolve("memories.json"); + if (Files.exists(path)) { + this.recordedMemories = RawJsonReader.readSyncWithBak(path, MemoriesPlugin.RecordedMemories.CODEC, this.getLogger()); + if (this.recordedMemories == null) { this.recordedMemories = new MemoriesPlugin.RecordedMemories(); } - } catch (IOException var2) { - throw new RuntimeException(var2); + } else { + this.recordedMemories = new MemoriesPlugin.RecordedMemories(); } this.hasInitializedMemories = true; diff --git a/generated/com/hypixel/hytale/component/ArchetypeChunk.java b/generated/com/hypixel/hytale/component/ArchetypeChunk.java index f394ec15..8d0145da 100644 --- a/generated/com/hypixel/hytale/component/ArchetypeChunk.java +++ b/generated/com/hypixel/hytale/component/ArchetypeChunk.java @@ -232,7 +232,6 @@ public class ArchetypeChunk { @Nonnull IntObjectConsumer> referenceConsumer ) { int firstTransfered = Integer.MIN_VALUE; - int lastTransfered = Integer.MIN_VALUE; Component[] entityComponents = new Component[this.archetype.length()]; for (int entityIndex = 0; entityIndex < this.entitiesSize; entityIndex++) { @@ -241,7 +240,6 @@ public class ArchetypeChunk { firstTransfered = entityIndex; } - lastTransfered = entityIndex; Ref ref = this.refs[entityIndex]; this.refs[entityIndex] = null; @@ -263,29 +261,31 @@ public class ArchetypeChunk { } if (firstTransfered != Integer.MIN_VALUE) { - if (lastTransfered == this.entitiesSize - 1) { - this.entitiesSize = firstTransfered; - return; - } + int writeIndex = firstTransfered; - int newSize = this.entitiesSize - (lastTransfered - firstTransfered + 1); - - for (int entityIndexx = firstTransfered; entityIndexx <= lastTransfered; entityIndexx++) { - if (this.refs[entityIndexx] == null) { - int lastIndex = this.entitiesSize - 1; - if (lastIndex == lastTransfered) { - break; + for (int readIndex = firstTransfered + 1; readIndex < this.entitiesSize; readIndex++) { + if (this.refs[readIndex] != null) { + if (writeIndex != readIndex) { + this.fillEmptyIndex(writeIndex, readIndex); } - if (entityIndexx != lastIndex) { - this.fillEmptyIndex(entityIndexx, lastIndex); - } - - this.entitiesSize--; + writeIndex++; } } - this.entitiesSize = newSize; + for (int ix = writeIndex; ix < this.entitiesSize; ix++) { + this.refs[ix] = null; + + for (int j = this.archetype.getMinIndex(); j < this.archetype.length(); j++) { + ComponentType> componentType = (ComponentType>)this.archetype + .get(j); + if (componentType != null) { + this.components[componentType.getIndex()][ix] = null; + } + } + } + + this.entitiesSize = writeIndex; } } diff --git a/generated/com/hypixel/hytale/server/core/plugin/PluginClassLoader.java b/generated/com/hypixel/hytale/server/core/plugin/PluginClassLoader.java index 2595dc01..3105a9aa 100644 --- a/generated/com/hypixel/hytale/server/core/plugin/PluginClassLoader.java +++ b/generated/com/hypixel/hytale/server/core/plugin/PluginClassLoader.java @@ -157,7 +157,7 @@ public class PluginClassLoader extends URLClassLoader { public static boolean isFromThirdPartyPlugin(@Nullable Throwable throwable) { while (throwable != null) { for (StackTraceElement element : throwable.getStackTrace()) { - if ("ThirdParty".equals(element.getClassLoaderName())) { + if (element.getClassLoaderName() != null && element.getClassLoaderName().startsWith("ThirdParty")) { return true; } } diff --git a/generated/com/hypixel/hytale/server/spawning/world/system/WorldSpawningSystem.java b/generated/com/hypixel/hytale/server/spawning/world/system/WorldSpawningSystem.java index f2283af2..9eca928e 100644 --- a/generated/com/hypixel/hytale/server/spawning/world/system/WorldSpawningSystem.java +++ b/generated/com/hypixel/hytale/server/spawning/world/system/WorldSpawningSystem.java @@ -249,42 +249,42 @@ public class WorldSpawningSystem extends TickingSystem { boolean fullyPopulated = true; if (wasFullyPopulated) { for (Ref chunkRef : chunkRefSet) { - ChunkSpawnData chunkSpawnDataComponent = store.getComponent(chunkRef, this.chunkSpawnDataComponentType); - - assert chunkSpawnDataComponent != null; - - ChunkSpawnedNPCData chunkSpawnedNPCDataComponent = store.getComponent(chunkRef, this.chunkSpawnedNPCDataComponentType); - - assert chunkSpawnedNPCDataComponent != null; - - ChunkEnvironmentSpawnData chunkEnvironmentSpawnData = chunkSpawnDataComponent.getEnvironmentSpawnData(environmentIndex); - fullyPopulated = fullyPopulated - && chunkEnvironmentSpawnData.isFullyPopulated(chunkSpawnedNPCDataComponent.getEnvironmentSpawnCount(environmentIndex)); - if (chunkEnvironmentSpawnData.isRoleSpawnable(roleIndex)) { - spawnable = true; - weight += store.getComponent(chunkRef, this.spawnJobDataComponentType) == null && !getAndUpdateSpawnCooldown(chunkSpawnDataComponent) - ? 1.0 - : 0.0; + if (chunkRef.isValid()) { + ChunkSpawnData chunkSpawnDataComponent = store.getComponent(chunkRef, this.chunkSpawnDataComponentType); + if (chunkSpawnDataComponent != null) { + ChunkSpawnedNPCData chunkSpawnedNPCDataComponent = store.getComponent(chunkRef, this.chunkSpawnedNPCDataComponentType); + if (chunkSpawnedNPCDataComponent != null) { + ChunkEnvironmentSpawnData chunkEnvironmentSpawnData = chunkSpawnDataComponent.getEnvironmentSpawnData(environmentIndex); + fullyPopulated = fullyPopulated + && chunkEnvironmentSpawnData.isFullyPopulated(chunkSpawnedNPCDataComponent.getEnvironmentSpawnCount(environmentIndex)); + if (chunkEnvironmentSpawnData.isRoleSpawnable(roleIndex)) { + spawnable = true; + weight += store.getComponent(chunkRef, this.spawnJobDataComponentType) == null && !getAndUpdateSpawnCooldown(chunkSpawnDataComponent) + ? 1.0 + : 0.0; + } + } + } } } } else { - for (Ref chunkRef : chunkRefSet) { - ChunkSpawnData chunkSpawnDataComponentx = store.getComponent(chunkRef, this.chunkSpawnDataComponentType); - - assert chunkSpawnDataComponentx != null; - - ChunkSpawnedNPCData chunkSpawnedNPCDataComponentx = store.getComponent(chunkRef, this.chunkSpawnedNPCDataComponentType); - - assert chunkSpawnedNPCDataComponentx != null; - - ChunkEnvironmentSpawnData chunkEnvironmentSpawnData = chunkSpawnDataComponentx.getEnvironmentSpawnData(environmentIndex); - double spawnCount = chunkSpawnedNPCDataComponentx.getEnvironmentSpawnCount(environmentIndex); - fullyPopulated = fullyPopulated && chunkEnvironmentSpawnData.isFullyPopulated(spawnCount); - if (chunkEnvironmentSpawnData.isRoleSpawnable(roleIndex)) { - spawnable = true; - weight += store.getComponent(chunkRef, this.spawnJobDataComponentType) == null && !getAndUpdateSpawnCooldown(chunkSpawnDataComponentx) - ? chunkEnvironmentSpawnData.getWeight(spawnCount) - : 0.0; + for (Ref chunkRefx : chunkRefSet) { + if (chunkRefx.isValid()) { + ChunkSpawnData chunkSpawnDataComponent = store.getComponent(chunkRefx, this.chunkSpawnDataComponentType); + if (chunkSpawnDataComponent != null) { + ChunkSpawnedNPCData chunkSpawnedNPCDataComponent = store.getComponent(chunkRefx, this.chunkSpawnedNPCDataComponentType); + if (chunkSpawnedNPCDataComponent != null) { + ChunkEnvironmentSpawnData chunkEnvironmentSpawnData = chunkSpawnDataComponent.getEnvironmentSpawnData(environmentIndex); + double spawnCount = chunkSpawnedNPCDataComponent.getEnvironmentSpawnCount(environmentIndex); + fullyPopulated = fullyPopulated && chunkEnvironmentSpawnData.isFullyPopulated(spawnCount); + if (chunkEnvironmentSpawnData.isRoleSpawnable(roleIndex)) { + spawnable = true; + weight += store.getComponent(chunkRefx, this.spawnJobDataComponentType) == null && !getAndUpdateSpawnCooldown(chunkSpawnDataComponent) + ? chunkEnvironmentSpawnData.getWeight(spawnCount) + : 0.0; + } + } + } } } } @@ -293,8 +293,8 @@ public class WorldSpawningSystem extends TickingSystem { if (spawnable) { return RandomExtra.randomWeightedElement( chunkRefSet, - (chunkRefx, index) -> { - ChunkSpawnData chunkSpawnDataComponent = store.getComponent(chunkRefx, this.chunkSpawnDataComponentType); + (chunkRefxx, index) -> { + ChunkSpawnData chunkSpawnDataComponent = store.getComponent(chunkRefxx, this.chunkSpawnDataComponentType); assert chunkSpawnDataComponent != null; @@ -302,24 +302,24 @@ public class WorldSpawningSystem extends TickingSystem { return chunkEnvironmentSpawnDatax.isRoleSpawnable(index); }, wasFullyPopulated - ? (chunkRefx, index) -> { - ChunkSpawnData spawnChunkDataComponent = store.getComponent(chunkRefx, this.chunkSpawnDataComponentType); + ? (chunkRefxx, index) -> { + ChunkSpawnData spawnChunkDataComponent = store.getComponent(chunkRefxx, this.chunkSpawnDataComponentType); assert spawnChunkDataComponent != null; - return store.getComponent(chunkRefx, this.spawnJobDataComponentType) == null && !spawnChunkDataComponent.isOnSpawnCooldown() ? 1.0 : 0.0; + return store.getComponent(chunkRefxx, this.spawnJobDataComponentType) == null && !spawnChunkDataComponent.isOnSpawnCooldown() ? 1.0 : 0.0; } - : (chunkRefx, index) -> { - ChunkSpawnData chunkSpawnDataComponent = store.getComponent(chunkRefx, this.chunkSpawnDataComponentType); + : (chunkRefxx, index) -> { + ChunkSpawnData chunkSpawnDataComponent = store.getComponent(chunkRefxx, this.chunkSpawnDataComponentType); assert chunkSpawnDataComponent != null; - ChunkSpawnedNPCData chunkSpawnedNPCDataComponentx = store.getComponent(chunkRefx, this.chunkSpawnedNPCDataComponentType); + ChunkSpawnedNPCData chunkSpawnedNPCDataComponentx = store.getComponent(chunkRefxx, this.chunkSpawnedNPCDataComponentType); assert chunkSpawnedNPCDataComponentx != null; ChunkEnvironmentSpawnData chunkEnvironmentSpawnDatax = chunkSpawnDataComponent.getEnvironmentSpawnData(environmentIndex); - return store.getComponent(chunkRefx, this.spawnJobDataComponentType) == null && !chunkSpawnDataComponent.isOnSpawnCooldown() + return store.getComponent(chunkRefxx, this.spawnJobDataComponentType) == null && !chunkSpawnDataComponent.isOnSpawnCooldown() ? chunkEnvironmentSpawnDatax.getWeight(chunkSpawnedNPCDataComponentx.getEnvironmentSpawnCount(environmentIndex)) : 0.0; },