@@ -3,6 +3,7 @@ package com.github.zly2006.enclosure
3
3
import com.github.zly2006.enclosure.ServerMain.enclosures
4
4
import com.github.zly2006.enclosure.ServerMain.getAllEnclosures
5
5
import com.github.zly2006.enclosure.access.ChunkAccess
6
+ import com.github.zly2006.enclosure.command.FORCED
6
7
import com.github.zly2006.enclosure.command.MAX_CHUNK_LEVEL
7
8
import com.github.zly2006.enclosure.utils.Serializable2Text.SerializationSettings.NameHover
8
9
import net.minecraft.nbt.NbtCompound
@@ -11,7 +12,6 @@ import net.minecraft.nbt.NbtString
11
12
import net.minecraft.registry.RegistryWrapper
12
13
import net.minecraft.server.world.ChunkLevelType
13
14
import net.minecraft.server.world.ChunkLevels
14
- import net.minecraft.server.world.ChunkTicketType
15
15
import net.minecraft.server.world.ServerWorld
16
16
import net.minecraft.text.Text
17
17
import net.minecraft.util.math.BlockPos
@@ -137,10 +137,10 @@ class EnclosureList(world: ServerWorld, private val isRoot: Boolean) : Persisten
137
137
.minOfOrNull { it.ticket!! .level }
138
138
? : ChunkLevels .getLevelFromType(ChunkLevelType .FULL ) // chunk border level
139
139
if (targetLevel > area.ticket!! .level) {
140
- world.chunkManager.removeTicket(ChunkTicketType . FORCED , it, MAX_CHUNK_LEVEL - area.ticket!! .level, it)
140
+ world.chunkManager.removeTicket(FORCED , it, MAX_CHUNK_LEVEL - area.ticket!! .level, it)
141
141
}
142
142
} else {
143
- world.chunkManager.removeTicket(ChunkTicketType . FORCED , it, MAX_CHUNK_LEVEL - area.ticket!! .level, it)
143
+ world.chunkManager.removeTicket(FORCED , it, MAX_CHUNK_LEVEL - area.ticket!! .level, it)
144
144
}
145
145
}
146
146
}
@@ -150,7 +150,7 @@ class EnclosureList(world: ServerWorld, private val isRoot: Boolean) : Persisten
150
150
if (area.ticket != null ) {
151
151
if (area.ticket!! .remainingTicks > 0 ) {
152
152
area.toBlockBox().streamChunkPos().forEach {
153
- world.chunkManager.addTicket(ChunkTicketType . FORCED , it, MAX_CHUNK_LEVEL - area.ticket!! .level, it)
153
+ world.chunkManager.addTicket(FORCED , it, MAX_CHUNK_LEVEL - area.ticket!! .level, it)
154
154
}
155
155
// todo: message
156
156
}
0 commit comments