Class PlayerEditConstructionEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.world.PlayerConstructionEvent
net.risingworld.api.events.player.world.PlayerEditConstructionEvent
- All Implemented Interfaces:
Cancellable
Called when a player edits a construction element (e.g changes texture, rotation, position etc).
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the construction element.int
Gets the new x offset of the chunk (which contains the construction element).int
Gets the new y offset of the chunk (which contains the construction element).int
Gets the new z offset of the chunk (which contains the construction element).int
Gets the new world position of the construction element as a Vector3f.Gets the new rotation of the construction element as a Quaternion.Gets the new size (x, y, z) of the construction element as a Vector3f.int
Gets the new texture of the construction element.float
float
short
Gets the new type ID of the construction element.Methods inherited from class net.risingworld.api.events.player.world.PlayerConstructionEvent
getChunkPositionX, getChunkPositionY, getChunkPositionZ, getConstructionDefinition, getGlobalID, getTexture, getTypeID, isCancelled, setCancelled
Methods inherited from class net.risingworld.api.events.player.PlayerEvent
getPlayer
-
Method Details
-
getNewTypeID
public short getNewTypeID()Gets the new type ID of the construction element.- Returns:
- the new construction element type ID.
-
getNewTexture
public int getNewTexture()Gets the new texture of the construction element.- Returns:
- the new construction element texture ID.
-
getNewChunkPositionX
public int getNewChunkPositionX()Gets the new x offset of the chunk (which contains the construction element).- Returns:
- the new x chunk offset.
-
getNewChunkPositionY
public int getNewChunkPositionY()Gets the new y offset of the chunk (which contains the construction element).- Returns:
- the new y chunk offset.
-
getNewChunkPositionZ
public int getNewChunkPositionZ()Gets the new z offset of the chunk (which contains the construction element).- Returns:
- the new z chunk offset.
-
getNewPosition
Gets the new world position of the construction element as a Vector3f.- Returns:
- the new global construction element position as a Vector3f.
-
getNewRotation
Gets the new rotation of the construction element as a Quaternion.- Returns:
- the new construction element rotation as a Quaternion.
-
getNewSize
Gets the new size (x, y, z) of the construction element as a Vector3f.- Returns:
- the new size of the construction element as a Vector3f.
-
getNewTextureScale
public float getNewTextureScale() -
getNewThickness
public float getNewThickness() -
getNewSurfaceOffset
-
getNewSurfaceScale
-
getNewColor
public int getNewColor() -
getConstructionElement
Description copied from class:PlayerConstructionEvent
Gets the construction element.- Overrides:
getConstructionElement
in classPlayerConstructionEvent
- Returns:
- the construction element.
-