Interface IClientWorldAccessor
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
The world accessor implemented by the client, offers some extra features only available on the client
public interface IClientWorldAccessor : IWorldAccessor
- Inherited Members
- Extension Methods
Properties
AmbientParticles
Whether to spawn ambient particles
bool AmbientParticles { get; set; }
Property Value
Calendar
Interface to access the game calendar
IClientGameCalendar Calendar { get; }
Property Value
Dimensions
Dictionary<int, IMiniDimension> Dimensions { get; }
Property Value
ForceLiquidSelectable
Whether the player can select liquids
bool ForceLiquidSelectable { get; set; }
Property Value
LoadedEntities
The internal cache of all currently loaded entities. Warning: You should not set or remove anything from this dic unless you really know what you're doing. Use SpawnEntity/DespawnEntity instead.
Dictionary<long, Entity> LoadedEntities { get; }
Property Value
MapSizeY
Gets the MapSizeY on the client, for chunk column enumeration, without this this is surprisingly hard to get...
int MapSizeY { get; }
Property Value
Player
Returns the player running this client instance
IClientPlayer Player { get; }
Property Value
Methods
AddCameraShake(float)
Shakes the camera view by given strength
void AddCameraShake(float strengh)
Parameters
strengh
float
ApplyColorMapOnRgba(string, string, int, int, int, bool)
Loads the rgb climate and season color map value for given rain and temp value and multiplies it byte-wise with supplied color
int ApplyColorMapOnRgba(string climateColorMap, string seasonColorMap, int color, int rain, int temp, bool flipRb = true)
Parameters
Returns
ApplyColorMapOnRgba(string, string, int, int, int, int, bool)
Loads the rgb climate and season color map value at given position and multiplies it byte-wise with supplied color
int ApplyColorMapOnRgba(string climateColorMap, string seasonColorMap, int color, int posX, int posY, int posZ, bool flipRb = true)
Parameters
Returns
ApplyColorMapOnRgba(ColorMap, ColorMap, int, int, int, int, bool)
int ApplyColorMapOnRgba(ColorMap climateColorMap, ColorMap seasonColorMap, int color, int posX, int posY, int posZ, bool flipRb = true)
Parameters
Returns
CloneBlockDamage(BlockPos, BlockPos)
Applies the same damage overlay effect on the target as the source has
void CloneBlockDamage(BlockPos sourcePos, BlockPos targetPos)
Parameters
GetColorMapData(Block, int, int, int)
ColorMapData GetColorMapData(Block block, int posX, int posY, int posZ)
Parameters
Returns
GetOrCreateDimension(int, Vec3d)
IMiniDimension GetOrCreateDimension(int dimId, Vec3d pos)
Parameters
Returns
IncurBlockDamage(BlockSelection, EnumTool?, float)
Same effect as when player left-click breaks a block, but will not cause actual breakage of the block
void IncurBlockDamage(BlockSelection blockSelection, EnumTool? withTool, float damage)
Parameters
blockSelection
BlockSelectionwithTool
EnumTool?damage
float
LoadSound(SoundParams)
Loads a sounds without playing it. Use to individually control when to play/stop. Might want to set DisposeOnFinish to false but then you have to dispose it yourself.
ILoadedSound LoadSound(SoundParams param)
Parameters
param
SoundParams
Returns
PlaySoundAtAndGetDuration(AssetLocation, double, double, double, IPlayer, bool, float, float)
Exactly like PlaySoundAt except that it returns the duration of the played sound. (We don't want to change the method signature of PlaySoundAt for API mod breakage reasons)
int PlaySoundAtAndGetDuration(AssetLocation sound, double x, double y, double z, IPlayer ignorePlayerUid = null, bool randomizePitch = true, float range = 32, float volume = 1)
Parameters
sound
AssetLocationx
doubley
doublez
doubleignorePlayerUid
IPlayerrandomizePitch
boolrange
floatvolume
float
Returns
ReduceCameraShake(float)
void ReduceCameraShake(float amount)
Parameters
amount
float
SetBlocksPreviewDimension(int)
void SetBlocksPreviewDimension(int dimId)
Parameters
dimId
int
SetCameraShake(float)
void SetCameraShake(float strengh)
Parameters
strengh
float
SetChunkColumnVisible(int, int, int)
Does exactly what it says on the tin!
void SetChunkColumnVisible(int cx, int cz, int dimension)
Parameters
TryAttackEntity(EntitySelection)
Makes an attempt to attack a particular entity.
void TryAttackEntity(EntitySelection sele)
Parameters
sele
EntitySelection
TryGetMiniDimension(Vec3i, out IMiniDimension)
bool TryGetMiniDimension(Vec3i origin, out IMiniDimension dimension)
Parameters
origin
Vec3idimension
IMiniDimension