Interface PointProvider
- All Known Implementing Classes:
StaticPointProvider,WaypointProvider,WorldPointProvider
public interface PointProvider
The base interface for point types.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacePointProvider.PointSerializer<T extends PointProvider>An object that constructs point providers from JSON and network. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.Vec3getPoint(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 cutsceneStart) Returns the point this PointProvider represents.default booleanvoidtoNetwork(net.minecraft.network.FriendlyByteBuf buf) Writes this point provider's properties to network, so that it can be fully reconstructed later.
-
Field Details
-
POINT_CACHE
-
-
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.
-
shouldCache
default boolean shouldCache()- Returns:
- whether this point's value should be cached before starting the cutscene
-