类 SuperLeadRopeEvent.ModifyValue<T>

java.lang.Object
net.minecraftforge.eventbus.api.Event
top.r3944realms.superleadrope.api.event.SuperLeadRopeEvent
top.r3944realms.superleadrope.api.event.SuperLeadRopeEvent.ModifyValue<T>
类型参数:
T - the type parameter
所有已实现的接口:
net.minecraftforge.fml.event.IModBusEvent
封闭类:
SuperLeadRopeEvent

public static class SuperLeadRopeEvent.ModifyValue<T> extends SuperLeadRopeEvent
The type Modify value.
  • 构造器详细资料

    • ModifyValue

      public ModifyValue(net.minecraft.world.entity.Entity leashedEntity, UUID holderUUID, @Nullable T oldValue, @Nullable T newValue, SuperLeadRopeEvent.ModifyValue.Type type)
      Instantiates a new Modify value.
      参数:
      leashedEntity - the leashed entity
      holderUUID - the holder uuid
      oldValue - the old value
      newValue - the new value
      type - the type
    • ModifyValue

      public ModifyValue(net.minecraft.world.entity.Entity leashedEntity, net.minecraft.core.BlockPos knotBlockpos, @Nullable T oldValue, @Nullable T newValue, SuperLeadRopeEvent.ModifyValue.Type type)
      Instantiates a new Modify value.
      参数:
      leashedEntity - the leashed entity
      knotBlockpos - the knot blockpos
      oldValue - the old value
      newValue - the new value
      type - the type
    • ModifyValue

      public ModifyValue(net.minecraft.world.entity.Entity leashedEntity, @Nullable T oldValue, @Nullable T newValue, SuperLeadRopeEvent.ModifyValue.Type type)
      Instantiates a new Modify value.
      参数:
      leashedEntity - the leashed entity
      oldValue - the old value
      newValue - the new value
      type - the type
  • 方法详细资料

    • getOldValueAs

      public <R> R getOldValueAs(Class<R> clazz)
      Gets old value as.
      类型参数:
      R - the type parameter
      参数:
      clazz - the clazz
      返回:
      the old value as
    • getNewValueAs

      public <R> R getNewValueAs(Class<R> clazz)
      Gets new value as.
      类型参数:
      R - the type parameter
      参数:
      clazz - the clazz
      返回:
      the new value as
    • getOldValue

      public T getOldValue()
      Gets old value.
      返回:
      the old value
    • getNewValue

      public T getNewValue()
      Gets new value.
      返回:
      the new value
    • setNewValue

      public void setNewValue(@Nullable T newValue)
      Sets new value.
      参数:
      newValue - the new value