Klasse PlayerPlaceVegetationEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.world.PlayerVegetationEvent
net.risingworld.api.events.player.world.PlayerPlaceVegetationEvent
- Alle implementierten Schnittstellen:
Cancellable
- Bekannte direkte Unterklassen:
PlayerCreativePlaceVegetationEvent
Called when the player places a plant (saplings, seedlings etc).
-
Feldübersicht
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
Gets the growth time for this plant in seconds.boolean
Gets whether or not this plant can grow.void
setGrowthTime
(int growthTime) Sets the growth time (in seconds) for this plant.void
setPosition
(float x, float y, float z) Changes the plant position.void
setPosition
(Vector3f position) Changes the plant position.void
setRotation
(float pitch, float yaw, float roll) Changes the plant rotation.void
setRotation
(Quaternion rotation) Changes the plant rotation.void
setTypeID
(short typeID) Sets the type ID of the plant.Von Klasse geerbte Methoden net.risingworld.api.events.player.world.PlayerVegetationEvent
getChunkPositionX, getChunkPositionY, getChunkPositionZ, getGlobalID, getPlant, getPlantDefinition, getTypeID, isCancelled, setCancelled
Von Klasse geerbte Methoden net.risingworld.api.events.player.PlayerEvent
getPlayer
-
Konstruktordetails
-
PlayerPlaceVegetationEvent
protected PlayerPlaceVegetationEvent(long pointer)
-
-
Methodendetails
-
setTypeID
public void setTypeID(short typeID) Sets the type ID of the plant.- Parameter:
typeID
- the new plant type ID.
-
setPosition
Changes the plant position.- Parameter:
position
- the new plant world position.
-
setPosition
public void setPosition(float x, float y, float z) Changes the plant position.- Parameter:
x
- the new plant world x position.y
- the new plant world y position.z
- the new plant world z position.
-
setRotation
Changes the plant rotation.- Parameter:
rotation
- the new plant rotation. Set to null to reset the rotation (Quaternion.IDENTITY).
-
setRotation
public void setRotation(float pitch, float yaw, float roll) Changes the plant rotation.- Parameter:
pitch
- the new x angle, as euler rotation (pitch).yaw
- the new y angle, as euler rotation (yaw).roll
- the new z angle, as euler rotation (roll).
-
isGrowable
public boolean isGrowable()Gets whether or not this plant can grow.- Gibt zurück:
- true if this plant can grow (e.g saplings, seedlings etc), false if not.
-
getGrowthTime
public int getGrowthTime()Gets the growth time for this plant in seconds. The growth time determines how long it takes until this plant grows (reaching the next growth stage). Returns 0 if this plant cannot grow.- Gibt zurück:
- the growth time, in seconds.
-
setGrowthTime
public void setGrowthTime(int growthTime) Sets the growth time (in seconds) for this plant. Only works for plants which are growable (seeisGrowable()
).- Parameter:
growthTime
- the new growth duration in seconds.
-