Package net.risingworld.api.definitions
Class Objects.ObjectDefinition
java.lang.Object
net.risingworld.api.definitions.Objects.ObjectDefinition
- Enclosing class:
Objects
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionfloat
Amount how much the object adapts to the ground / collision normal (depending on the pedestal type)Scale factors which will be applied to the object bounds when placing it.Break soundint
Default color (RGBA as int) which is applied to this object initially.byte
Default status of this object when it is spawnedEra/age this object belongs toObject size / extentboolean
Determines if object can be freely placed (otherwise it means the object can only snap to particular targets)Hit soundshort
Internal type ID of the objectboolean
If true, bound checks are disabled for this objectDetermines if this object can be flipped / inverted along certain axesboolean
Is this object a crafting station?boolean
Determines if other objects can be placed on this objectObject material (i.e material this element mostly consists of, e.g wood, metal etc)float
Max range value (color alpha) when painting the object (0-1)Maximum xyz scale factorbyte
Max allowed status for this object (min status is always 0)float
Min range value (color alpha) when painting the object (0-1)Minimum xyz scale factorName of the objectboolean
Can the user paint this object?Base / pedestal of the object (i.e it's foundation or stand)boolean
Can this object be picked up?Path to the pivot asset.boolean
Determines whether or not this element can be placed underwaterboolean
If true, this object can be placed anywhere (i.e on all objects, irrespective if they're a "placetarget")Place soundfloat
Duration how long it takes to place this element (in seconds)Related item name.float
Light intensity when rendering the object icon (0.0 - 1.0).Optional offset of the object when rendering the object iconOptional offset rotation when rendering the object icon (default rotation will be multiplied with this optional rotation)float
Render scale, i.e scale factor for the object when rendering.Optional offset of the camera when rendering the object iconDetermines how much the element should be resized along x, y and z (0-1).Optional additional rotation that is applied to the model when placing itDetermines in which direction(s) the elements will be resized if the player wants to resize it along xDetermines in which direction(s) the elements will be resized if the player wants to resize it along yDetermines in which direction(s) the elements will be resized if the player wants to resize it along zboolean
Is this object selectable?Optional "helper" object (path to prefab) that's shown if the selector is active (e.g arrows etc).If there is a helper object, this is the local offset of itIf there is a helper object, this is the local rotation of it (euler angles)float
If there is a helper object, this is the local scale of itshort
Object strength (hit points)Object typeArray containing all object variants.int
Number of additonal object variants. -
Method Summary
Modifier and TypeMethodDescriptiongetIcon
(int variant) Gets the ingame icon of this object as TextureAsset.getVariant
(int variant) Gets an object variant.void
-
Field Details
-
id
public short idInternal type ID of the object -
name
Name of the object -
type
Object type -
variations
public int variationsNumber of additonal object variants. 0 means there are no additional variants available -
strength
public short strengthObject strength (hit points) -
extent
Object size / extent -
material
Object material (i.e material this element mostly consists of, e.g wood, metal etc) -
era
Era/age this object belongs to -
hitsound
Hit sound -
breaksound
Break sound -
placesound
Place sound -
placetime
public float placetimeDuration how long it takes to place this element (in seconds) -
placeableunderwater
public boolean placeableunderwaterDetermines whether or not this element can be placed underwater -
selectable
public boolean selectableIs this object selectable? -
pickupable
public boolean pickupableCan this object be picked up? -
iscraftingstation
public boolean iscraftingstationIs this object a crafting station? -
defaultstatus
public byte defaultstatusDefault status of this object when it is spawned -
maxstatus
public byte maxstatusMax allowed status for this object (min status is always 0) -
paintable
public boolean paintableCan the user paint this object? -
mincolorrange
public float mincolorrangeMin range value (color alpha) when painting the object (0-1) -
maxcolorrange
public float maxcolorrangeMax range value (color alpha) when painting the object (0-1) -
defaultcolor
public int defaultcolorDefault color (RGBA as int) which is applied to this object initially. Default: 0 (black no alpha) -
invertibleaxes
Determines if this object can be flipped / inverted along certain axes -
minscale
Minimum xyz scale factor -
maxscale
Maximum xyz scale factor -
scaleaxisx
Determines in which direction(s) the elements will be resized if the player wants to resize it along x -
scaleaxisy
Determines in which direction(s) the elements will be resized if the player wants to resize it along y -
scaleaxisz
Determines in which direction(s) the elements will be resized if the player wants to resize it along z -
resizefactor
Determines how much the element should be resized along x, y and z (0-1). Default is 1 -
isplacetarget
public boolean isplacetargetDetermines if other objects can be placed on this object -
freeplacement
public boolean freeplacementDetermines if object can be freely placed (otherwise it means the object can only snap to particular targets) -
placeanywhere
public boolean placeanywhereIf true, this object can be placed anywhere (i.e on all objects, irrespective if they're a "placetarget") -
rotationoffset
Optional additional rotation that is applied to the model when placing it -
selectorhelper
Optional "helper" object (path to prefab) that's shown if the selector is active (e.g arrows etc). May be null -
selectorhelperoffset
If there is a helper object, this is the local offset of it -
selectorhelperrotation
If there is a helper object, this is the local rotation of it (euler angles) -
selectorhelperscale
public float selectorhelperscaleIf there is a helper object, this is the local scale of it -
ignorebounds
public boolean ignoreboundsIf true, bound checks are disabled for this object -
boundscale
Scale factors which will be applied to the object bounds when placing it. Smaller values to make the bounds smaller etc. Default is 1 1 1 -
adapttonormal
public float adapttonormalAmount how much the object adapts to the ground / collision normal (depending on the pedestal type) -
pedestal
Base / pedestal of the object (i.e it's foundation or stand) -
pivotasset
Path to the pivot asset. Used for object itself. Null if object has no pivots -
pivotsnapping
-
renderoffset
Optional offset of the object when rendering the object icon -
rendertransform
Optional offset of the camera when rendering the object icon -
renderrotation
Optional offset rotation when rendering the object icon (default rotation will be multiplied with this optional rotation) -
renderlightintensity
public float renderlightintensityLight intensity when rendering the object icon (0.0 - 1.0). Default: 1.0 -
renderscale
public float renderscaleRender scale, i.e scale factor for the object when rendering. Default: 1.0 -
variants
Array containing all object variants. Variant 0 is always the default variant. Never null and always has a minimum size of 1
-
-
Method Details
-
synchronize
public void synchronize() -
getVariant
Gets an object variant.- Parameters:
variant
- the variant. The default variant is always 0. The value is clamped automatically.- Returns:
- the object variant.
-
getIcon
Gets the ingame icon of this object as TextureAsset.- Parameters:
variant
- the object texture/variant. By default 0.- Returns:
- the icon of this object.
-