Interface PointProvider

All Known Implementing Classes:
StaticPointProvider, WaypointProvider, WorldPointProvider

public interface PointProvider
The base interface for point types.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    An object that constructs point providers from JSON and network.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.phys.Vec3
    getPoint(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 cutsceneStart)
    Returns the point this PointProvider represents.
     
    void
    toNetwork(net.minecraft.network.FriendlyByteBuf buf)
    Writes this point provider's properties to network, so that it can be fully reconstructed later.
  • Method Details

    • getPoint

      net.minecraft.world.phys.Vec3 getPoint(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 cutsceneStart)
      Returns the point this PointProvider represents.
      Parameters:
      level - the level the point is being obtained in.
      cutsceneStart - the starting position of the cutscene
      Returns:
      a point, relative to the starting position, or a rotation relative to the starting rotation
      See Also:
    • toNetwork

      void toNetwork(net.minecraft.network.FriendlyByteBuf buf)
      Writes this point provider's properties to network, so that it can be fully reconstructed later.
      See Also:
    • getSerializer

      PointProvider.PointSerializer<?> getSerializer()
      Returns:
      the serializer associated with this point provider's type. Ideally, this should always be the same object.