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.intGets the new x offset of the chunk (which contains the construction element).intGets the new y offset of the chunk (which contains the construction element).intGets the new z offset of the chunk (which contains the construction element).intGets 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.intGets the new texture of the construction element.floatfloatshortGets the new type ID of the construction element.Methods inherited from class PlayerConstructionEvent
getChunkPosition, getChunkPositionX, getChunkPositionY, getChunkPositionZ, getConstructionColor, getConstructionDefinition, getGlobalID, getLocalPosition, getPosition, getRotation, getSize, getTexture, getTypeID, isCancelled, setCancelledMethods inherited from class 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:PlayerConstructionEventGets the construction element.- Overrides:
getConstructionElementin classPlayerConstructionEvent- Returns:
- the construction element.
-