Interface WorldNarrator
-
Method Summary
Modifier and TypeMethodDescriptionGenerates a description of a given block to be narrated.Generates a description of a given entity to be narrated.Generates a description of the block or entity the player is currently looking at to be narrated.@Nullable net.minecraft.world.phys.HitResultrayCast()Preforms a ray cast to determine what the player is looking at.
-
Method Details
-
rayCast
Preforms a ray cast to determine what the player is looking at.A value of
nullis equivalent to aHitResultwith typeHitResult.Type.MISSand indicates that the player is not looking at anything.- Returns:
- A
HitResultfor what the player is looking at ornull. - Since:
- 1.12.0
-
narrate
@Contract(pure=true) @Nullable @Nullable String narrate(@NotNull @NotNull net.minecraft.world.phys.HitResult rayCast) Generates a description of the block or entity the player is currently looking at to be narrated.A value of
nullindicates that there is no narration available.- Parameters:
rayCast- Ray cast fromrayCast().- Returns:
- A string to be narrated to the player or null.
- Since:
- 1.12.0
-
narrate
-
narrate
-