Class Telekinesis


public class Telekinesis extends RaySpell
  • Constructor Details

    • Telekinesis

      public Telekinesis()
  • Method Details

    • onEntityHit

      protected boolean onEntityHit(CastContext ctx, net.minecraft.world.phys.EntityHitResult entityHit, net.minecraft.world.phys.Vec3 origin)
      Specified by:
      onEntityHit in class RaySpell
    • onBlockHit

      protected boolean onBlockHit(CastContext ctx, net.minecraft.world.phys.BlockHitResult blockHit, net.minecraft.world.phys.Vec3 origin)
      Specified by:
      onBlockHit in class RaySpell
    • onMiss

      protected boolean onMiss(CastContext ctx, net.minecraft.world.phys.Vec3 origin, net.minecraft.world.phys.Vec3 direction)
      Specified by:
      onMiss in class RaySpell
    • canCastByEntity

      public boolean canCastByEntity()
      Overrides:
      canCastByEntity in class RaySpell
    • canCastByLocation

      public boolean canCastByLocation()
      Overrides:
      canCastByLocation in class RaySpell
    • requiresPacket

      public boolean requiresPacket()
      Description copied from class: Spell
      Whether this spell requires a packet to be sent when it is cast. Returns true by default, but can be overridden to return false if the spell's cast() method does not use any code that must be executed client-side (i.e. particle spawning). This is not checked for continuous spells, because they never need to send packets.

      If in doubt, leave this method as is; it is purely an optimisation.

      Overrides:
      requiresPacket in class Spell
      Returns:
      true if the spell code should be run on the server and all clients in the dimension, false if the spell code should only be run on the server and the client of the player casting it.
    • properties

      @NotNull protected @NotNull SpellProperties properties()
      Specified by:
      properties in class Spell