Interface PositionSourceType<T extends PositionSource>
- All Known Implementing Classes:
BlockPositionSource.Type,EntityPositionSource.Type
public interface PositionSourceType<T extends PositionSource>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PositionSourceType<BlockPositionSource> This PositionSource type represents blocks within the world and a fixed position.static final PositionSourceType<EntityPositionSource> This PositionSource type represents an entity within the world. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<T> codec()static <S extends PositionSourceType<T>,T extends PositionSource>
SRegisters a new PositionSource type with the game registry.StreamCodec<? super RegistryFriendlyByteBuf, T>
-
Field Details
-
BLOCK
This PositionSource type represents blocks within the world and a fixed position. -
ENTITY
This PositionSource type represents an entity within the world. This source type will keep a reference to the entity itself.
-
-
Method Details
-
codec
com.mojang.serialization.MapCodec<T> codec() -
streamCodec
StreamCodec<? super RegistryFriendlyByteBuf,T> streamCodec() -
register
Registers a new PositionSource type with the game registry.- Parameters:
id- The Id to register the type to.type- The type to register.- Returns:
- The newly registered source type.
- See Also:
-