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 intprivate final CompassItemPropertyFunction.CompassWobbleprivate final CompassItemPropertyFunction.CompassWobble -
Constructor Summary
ConstructorsConstructorDescriptionCompassItemPropertyFunction(CompassItemPropertyFunction.CompassTarget pCompassTarget) -
Method Summary
Modifier and TypeMethodDescriptionprivate doublegetAngleFromEntityToPos(Entity pEntity, BlockPos pPos) private floatgetCompassRotation(ItemStack pStack, ClientLevel pLevel, int pSeed, Entity pEntity) private floatgetRandomlySpinningRotation(int pSeed, long pTicks) private floatgetRotationTowardsCompassTarget(Entity pEntity, long pTicks, BlockPos pPos) private doublegetWrappedVisualRotationY(Entity pEntity) private inthash(int pValue) private booleanisValidCompassTargetPos(Entity pEntity, GlobalPos pPos) private ClientLeveltryFetchLevelIfMissing(Entity pEntity, ClientLevel pLevel) floatunclampedCall(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, waitMethods 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:
unclampedCallin interfaceClampedItemPropertyFunction
-
getCompassRotation
-
getRandomlySpinningRotation
private float getRandomlySpinningRotation(int pSeed, long pTicks) -
getRotationTowardsCompassTarget
-
tryFetchLevelIfMissing
-
isValidCompassTargetPos
-
getAngleFromEntityToPos
-
getWrappedVisualRotationY
-
hash
private int hash(int pValue)
-