Class StatueEvent.ModifyStatue
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.StatueEvent
com.pixelmonmod.pixelmon.api.events.StatueEvent.ModifyStatue
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
StatueEvent
public static class StatueEvent.ModifyStatue
extends StatueEvent
implements net.neoforged.bus.api.ICancellableEvent
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 -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal EnumStatuePacketModeThe specific change being made as a member ofEnumStatuePacketModeFields inherited from class com.pixelmonmod.pixelmon.api.events.StatueEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionModifyStatue(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.voidsetStatue(StatueEntity statue) Sets the statue after the modification.voidSets the value for the property.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
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, SetAnimationInteger value is given:
SetAnimationFrame, SetFormEnumGrowth value is given:
SetGrowthEnumStatueTextureType is given:
SetTextureTypeBoolean value is given:
SetModelStanding -
setValue
Sets the value for the property. This depends on the changeType.String value is required:
SetName, SetLabel, SetAnimationInteger value is required:
SetAnimationFrame, SetFormEnumGrowth value is required:
SetGrowthEnumStatueTextureType is required:
SetTextureTypeBoolean 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
-