repo for my hex addons :3
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

still hate chunkloading btw

+6 -3
+6 -3
src/main/scala/org/eu/net/pool/hexic/Hexic.scala
··· 86 86 import java.io.{File, FileNotFoundException, FileOutputStream, IOException, InputStream} 87 87 import java.lang.invoke.MethodHandles 88 88 import java.lang.reflect.{Constructor, Field, Member, Method} 89 - import java.nio.file.{Files, Path, StandardOpenOption} 89 + import java.nio.file.{Files, Path, Paths, StandardOpenOption} 90 90 import java.util.{Optional, UUID} 91 91 import java.{lang, util} 92 92 import scala.annotation.unchecked.uncheckedVariance ··· 140 140 import at.petrak.hexcasting.common.casting.actions.eval.OpEval 141 141 import at.petrak.hexcasting.api.casting.eval.ResolvedPatternType 142 142 import at.petrak.hexcasting.common.casting.actions.spells.OpBreakBlock 143 + import kotlin.io.FileAlreadyExistsException 143 144 import net.beholderface.oneironaut.casting.iotatypes.DimIota 144 145 import net.fabricmc.fabric.api.dimension.v1.FabricDimensions 145 146 import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents ··· 1130 1131 planeCache.computeIfAbsent(uuid, _ => 1131 1132 val dimID: Identifier = s"fresh-${uuid.toString.replace("-", "")}" 1132 1133 val handle = Fantasy get server getOrOpenPersistentWorld(dimID, new RuntimeWorldConfig setGenerator new VoidChunkGenerator(server.getOverworld.getRegistryManager get RegistryKeys.BIOME)) 1133 - handle.asWorld.setChunkForced(0, 0, true) 1134 + server.submit((() => handle.asWorld.getChunkManager.setChunkForced(ChunkPos.ORIGIN, true)): Runnable) 1134 1135 handle 1135 1136 ) 1136 1137 extension (server: MinecraftServer) ··· 1343 1344 var xpToSpawn: Long = 0 1344 1345 val chunk = world.getChunkManager.getChunk(0, 0, ChunkStatus.FULL, false) 1345 1346 chunk.asInstanceOf[WorldChunk].loadEntities() 1347 + if isDev then world.dump(Files.createDirectories(Paths.get("deleted_world"))) 1346 1348 boundary: 1347 1349 if isDev then println("Beginning lurker cleanup") 1348 1350 try ··· 1350 1352 // test dim: hexic:fresh-9116c992558d4aca854d75270e100b84, uuid 9116c992-558d-4aca-854d-75270e100b84 1351 1353 iterated(world.iterateEntities): (entities, recurse) => 1352 1354 val entitySeq = entities.toSeq 1353 - if isDev then println(s"Performing pass ${pass += 1} over ${entitySeq.size} entities") 1355 + if isDev then println(s"Performing pass $pass over ${entitySeq.size} entities") 1354 1356 if entitySeq.nonEmpty then 1355 1357 for entity <- entitySeq do 1356 1358 entity match ··· 1379 1381 if isDev then println(s"Killing nonliving entity $e") 1380 1382 FabricDimensions.teleport(e, outer, TeleportTarget(pos, Vec3d.ZERO, e.getYaw, e.getPitch)) 1381 1383 e.kill() 1384 + pass += 1 1382 1385 if isDev then println(s"Proceeding to pass ${pass}") 1383 1386 recurse 1384 1387 if isDev then println(s"Ledger: $itemsToSpawn, $xpToSpawn XP")