Class StatueEvent.ModifyStatue
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.StatueEvent
com.pixelmonmod.pixelmon.api.events.StatueEvent.ModifyStatue
- Enclosing class:
- StatueEvent
Subclass event of
StatueEvent
fired when any of the StatueEntity
properties is changed. This can be any member of EnumStatuePacketMode
's options
Canceling this event will deny the specific change to the statue, though the client may become out of sync temporarily
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.StatueEvent
StatueEvent.CreateStatue, StatueEvent.DestroyStatue, StatueEvent.ModifyStatue
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionfinal EnumStatuePacketMode
The specific change being made as a member ofEnumStatuePacketMode
Fields inherited from class com.pixelmonmod.pixelmon.api.events.StatueEvent
player
-
Constructor Summary
ConstructorDescriptionModifyStatue
(net.minecraft.server.level.ServerPlayer player, StatueEntity statue, EnumStatuePacketMode changeType, Object value) -
Method Summary
Modifier and TypeMethodDescriptionGets the statue that is being modifiedgetValue()
Gets the value for the property.void
setStatue
(StatueEntity statue) Sets the statue after the modification.void
Sets the value for the property.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
changeType
The specific change being made as a member ofEnumStatuePacketMode
-
-
Constructor Details
-
ModifyStatue
public ModifyStatue(net.minecraft.server.level.ServerPlayer player, StatueEntity statue, EnumStatuePacketMode changeType, Object value)
-
-
Method Details
-
getValue
Gets the value for the property. This depends on the changeType.String value is given:
SetName, SetLabel, SetAnimation
Integer value is given:
SetAnimationFrame, SetForm
EnumGrowth value is given:
SetGrowth
EnumStatueTextureType is given:
SetTextureType
Boolean value is given:
SetModelStanding
-
setValue
Sets the value for the property. This depends on the changeType.String value is required:
SetName, SetLabel, SetAnimation
Integer value is required:
SetAnimationFrame, SetForm
EnumGrowth value is required:
SetGrowth
EnumStatueTextureType is required:
SetTextureType
Boolean value is required:
SetModelStanding
-
getStatue
Gets the statue that is being modified -
setStatue
Sets the statue after the modification. This can be a completely different EntityStatue if you wish, but it cannot be null
-