SharedInstanceModule
SharedInstanceModule
is an implementation of InstanceModule
that creates a single SharedInstance
for each game using a map loaded from an Anvil world. All instances on the same map of a game with this module will share the same block data, resulting in reduced memory usage compared to other instance modules.
Dependencies
This module depends on the following modules:
Usage
Import the module:
import com.bluedragonmc.server.module.instance.SharedInstanceModuleimport com.bluedragonmc.server.module.map.AnvilFileMapProviderModule // dependency
Use the module in your game’s initialize
function:
use(AnvilFileMapProviderModule("games/$name/$mapName")) // This is how you specify the path to the world folderuse(SharedInstanceModule())