Atavism Version 2018.1AGIS API

atavism.server.engine
Interface WorldLoaderOverride

All Known Implementing Classes:
DefaultWorldLoaderOverride

public interface WorldLoaderOverride

Override objects created during world file loading. Implement this interface to modify or override objects created from world files and world collections. Each method is called prior to creating an object. If the method returns false, the object is not created. The method may modify the object's initialization data (via Template, LightData, SpawnData, etc).

Register world loader override classes with InstancePlugin.registerWorldLoaderOverrideClass(String,Class). Set the instance's loader override by setting property InstanceClient.TEMPL_LOADER_OVERRIDE_NAME to the loader override's registered name. A new instance of the class will be created prior to loading the instance's world file.


Method Summary
 boolean adjustLightData(java.lang.String worldCollectionName, java.lang.String objectName, LightData lightData)
          Modify or override point lights.
 boolean adjustObjectTemplate(java.lang.String worldCollectionName, java.lang.String objectName, Template template)
          Modify or override object templates.
 boolean adjustRegion(java.lang.String worldCollectionName, java.lang.String objectName, Region region)
          Modify or override regions.
 boolean adjustRegionConfig(java.lang.String worldCollectionName, java.lang.String objectName, Region region, RegionConfig regionConfig)
          Modify or override region configuration.
 boolean adjustSpawnData(java.lang.String worldCollectionName, java.lang.String objectName, SpawnData spawnData)
          Modify or override spawn generator.
 

Method Detail

adjustLightData

boolean adjustLightData(java.lang.String worldCollectionName,
                        java.lang.String objectName,
                        LightData lightData)
Modify or override point lights.

Parameters:
worldCollectionName - World collection file name.
objectName - Point light name.
lightData - Light data.
Returns:
True to create the object, false to skip it.

adjustObjectTemplate

boolean adjustObjectTemplate(java.lang.String worldCollectionName,
                             java.lang.String objectName,
                             Template template)
Modify or override object templates. This method is called for static objects, marker-based particle effects, and marker-based sounds.

Particle effect names are constructed as "<marker-name>-<particle-effect-name>". Sound names are constructed as ""<marker-name>-<sound-file-name>".

Parameters:
worldCollectionName - World collection file name.
objectName - Static object name, particle effect name, or sound name.
template - Object template.
Returns:
True to create the object, false to skip it.

adjustRegion

boolean adjustRegion(java.lang.String worldCollectionName,
                     java.lang.String objectName,
                     Region region)
Modify or override regions. This method is called with region properties, but before adding RegionConfig.

Parameters:
worldCollectionName - World collection file name.
objectName - Region name.
region -
Returns:
True to create the object, false to skip it.

adjustRegionConfig

boolean adjustRegionConfig(java.lang.String worldCollectionName,
                           java.lang.String objectName,
                           Region region,
                           RegionConfig regionConfig)
Modify or override region configuration. This method is called for each RegionConfig on a Region. The following region features are included: sound, fog, directional light, ambient light.

Parameters:
worldCollectionName - World collection file name.
objectName - Region name.
region - Region object.
regionConfig - Region configuration.
Returns:
True to create the object, false to skip it.

adjustSpawnData

boolean adjustSpawnData(java.lang.String worldCollectionName,
                        java.lang.String objectName,
                        SpawnData spawnData)
Modify or override spawn generator.

Parameters:
worldCollectionName - World collection file name.
objectName - Spawn generator name (marker name).
spawnData - Spawn generator data.
Returns:
True to create the object, false to skip it.


Copyright © 2018 Dragonsan Studios Sp. z o.o.