Class CompassItemPropertyFunction
java.lang.Object
net.minecraft.client.renderer.item.CompassItemPropertyFunction
- All Implemented Interfaces:
ClampedItemPropertyFunction
,ItemPropertyFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
private final CompassItemPropertyFunction.CompassWobble
private final CompassItemPropertyFunction.CompassWobble
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprivate double
getAngleFromEntityToPos
(Entity entity, BlockPos pos) private float
getCompassRotation
(ItemStack stack, ClientLevel level, int seed, Entity entity) private float
getRandomlySpinningRotation
(int seed, long ticks) private float
getRotationTowardsCompassTarget
(Entity entity, long ticks, BlockPos pos) private double
getWrappedVisualRotationY
(Entity entity) private int
hash
(int value) private boolean
isValidCompassTargetPos
(Entity entity, GlobalPos pos) private ClientLevel
tryFetchLevelIfMissing
(Entity entity, ClientLevel level) float
unclampedCall
(ItemStack stack, ClientLevel level, LivingEntity p_entity, int seed) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.renderer.item.ClampedItemPropertyFunction
call
-
Field Details
-
DEFAULT_ROTATION
public static final int DEFAULT_ROTATION- See Also:
-
wobble
-
wobbleRandom
-
compassTarget
-
-
Constructor Details
-
CompassItemPropertyFunction
-
-
Method Details
-
unclampedCall
public float unclampedCall(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity p_entity, int seed) - Specified by:
unclampedCall
in interfaceClampedItemPropertyFunction
-
getCompassRotation
-
getRandomlySpinningRotation
private float getRandomlySpinningRotation(int seed, long ticks) -
getRotationTowardsCompassTarget
-
tryFetchLevelIfMissing
-
isValidCompassTargetPos
-
getAngleFromEntityToPos
-
getWrappedVisualRotationY
-
hash
private int hash(int value)
-