Package net.risingworld.api.definitions
Class Objects.ObjectDefinition
java.lang.Object
net.risingworld.api.definitions.Objects.ObjectDefinition
- Enclosing class:
 Objects
- 
Nested Class Summary
Nested Classes - 
Field Summary
FieldsModifier and TypeFieldDescriptionfloatAmount 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 soundintDefault color (RGBA as int) which is applied to this object initially.byteDefault status of this object when it is spawnedEra/age this object belongs toObject size / extentbooleanDetermines if object can be freely placed (otherwise it means the object can only snap to particular targets)Hit soundshortInternal type ID of the objectbooleanIf true, bound checks are disabled for this objectDetermines if this object can be flipped / inverted along certain axesbooleanIs this object a crafting station?booleanDetermines if other objects can be placed on this objectObject material (i.e material this element mostly consists of, e.g wood, metal etc)floatMax range value (color alpha) when painting the object (0-1)Maximum xyz scale factorbyteMax allowed status for this object (min status is always 0)floatMin range value (color alpha) when painting the object (0-1)Minimum xyz scale factorName of the objectbooleanCan the user paint this object?Base / pedestal of the object (i.e it's foundation or stand)booleanCan this object be picked up?Path to the pivot asset.booleanDetermines whether or not this element can be placed underwaterbooleanIf true, this object can be placed anywhere (i.e on all objects, irrespective if they're a "placetarget")Place soundfloatDuration how long it takes to place this element (in seconds)Related item name.floatLight 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)floatRender 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 zbooleanIs 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)floatIf there is a helper object, this is the local scale of itshortObject strength (hit points)Object typeArray containing all object variants.intNumber 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.
 
 
 -