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
ConstructorsConstructorDescriptionCompassItemPropertyFunction
(CompassItemPropertyFunction.CompassTarget pCompassTarget) -
Method Summary
Modifier and TypeMethodDescriptionprivate double
getAngleFromEntityToPos
(Entity pEntity, BlockPos pPos) private float
getCompassRotation
(ItemStack pStack, ClientLevel pLevel, int pSeed, Entity pEntity) private float
getRandomlySpinningRotation
(int pSeed, long pTicks) private float
getRotationTowardsCompassTarget
(Entity pEntity, long pTicks, BlockPos pPos) private double
getWrappedVisualRotationY
(Entity pEntity) private int
hash
(int pValue) private boolean
isValidCompassTargetPos
(Entity pEntity, GlobalPos pPos) private ClientLevel
tryFetchLevelIfMissing
(Entity pEntity, ClientLevel pLevel) float
unclampedCall
(ItemStack pStack, ClientLevel pLevel, LivingEntity pEntity, int pSeed) 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 pStack, @Nullable ClientLevel pLevel, @Nullable LivingEntity pEntity, int pSeed) - Specified by:
unclampedCall
in interfaceClampedItemPropertyFunction
-
getCompassRotation
-
getRandomlySpinningRotation
private float getRandomlySpinningRotation(int pSeed, long pTicks) -
getRotationTowardsCompassTarget
-
tryFetchLevelIfMissing
-
isValidCompassTargetPos
-
getAngleFromEntityToPos
-
getWrappedVisualRotationY
-
hash
private int hash(int pValue)
-