Merge branch '1.20.1' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into 1.19.4
This commit is contained in:
commit
07bc48887e
@ -35,6 +35,7 @@ import net.minecraftforge.event.entity.player.PlayerEvent
|
||||
import net.minecraftforge.event.level.ChunkWatchEvent
|
||||
import net.minecraftforge.event.level.LevelEvent
|
||||
import net.minecraftforge.event.server.ServerStoppingEvent
|
||||
import org.apache.logging.log4j.LogManager
|
||||
import ru.dbotthepony.mc.otm.SERVER_IS_LIVE
|
||||
import ru.dbotthepony.mc.otm.block.INeighbourChangeListener
|
||||
import ru.dbotthepony.mc.otm.block.RotatableMatteryBlock
|
||||
@ -656,6 +657,10 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc
|
||||
if (players.add(player)) {
|
||||
veto.add(player)
|
||||
recheckPlayer(player)
|
||||
} else if (player !in veto) {
|
||||
LOGGER.warn("Player got subscribed to ${ChunkPos(chunkPos)} multiple times without unsubscribing, forcefully resubscribing")
|
||||
unsubscribe(player)
|
||||
subscribe(player)
|
||||
}
|
||||
}
|
||||
|
||||
@ -730,6 +735,7 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc
|
||||
private val tickingMap = WeakHashMap<ServerLevel, WeakHashSet<ChunkSubscribers>>()
|
||||
|
||||
private val vec2Dir = Int2ObjectOpenHashMap<Direction>()
|
||||
private val LOGGER = LogManager.getLogger()
|
||||
|
||||
/**
|
||||
* Returns stream of players watching (tracking) specified [chunkPos] in [level]
|
||||
|
Loading…
Reference in New Issue
Block a user