Class CompassAngleState
java.lang.Object
net.minecraft.client.renderer.item.properties.numeric.NeedleDirectionHelper
net.minecraft.client.renderer.item.properties.numeric.CompassAngleState
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.client.renderer.item.properties.numeric.NeedleDirectionHelper
NeedleDirectionHelper.Wobbler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CompassAngleState.CompassTargetstatic final com.mojang.serialization.MapCodec<CompassAngleState> private final NeedleDirectionHelper.Wobblerprivate final RandomSourceprivate final NeedleDirectionHelper.Wobbler -
Constructor Summary
ConstructorsConstructorDescriptionCompassAngleState(boolean p_388844_, CompassAngleState.CompassTarget p_387613_) -
Method Summary
Modifier and TypeMethodDescriptionprotected floatcalculate(ItemStack pStack, ClientLevel pLevel, int pSeed, Entity pEntity) private static doublegetAngleFromEntityToPos(Entity pEntity, BlockPos pPos) private floatgetRandomlySpinningRotation(int pSeed, long pGameTime) private floatgetRotationTowardsCompassTarget(Entity pEntity, long pGameTime, BlockPos pTargetPos) private static floatgetWrappedVisualRotationY(Entity pEntity) private static inthash(int pSeed) private static booleanisValidCompassTargetPos(Entity pEntity, GlobalPos pPos) protected CompassAngleState.CompassTargettarget()Methods inherited from class net.minecraft.client.renderer.item.properties.numeric.NeedleDirectionHelper
get, newWobbler, nonWobbler, standardWobbler, wobble
-
Field Details
-
MAP_CODEC
-
wobbler
-
noTargetWobbler
-
compassTarget
-
random
-
-
Constructor Details
-
CompassAngleState
-
-
Method Details
-
calculate
- Specified by:
calculatein classNeedleDirectionHelper
-
getRandomlySpinningRotation
private float getRandomlySpinningRotation(int pSeed, long pGameTime) -
getRotationTowardsCompassTarget
-
isValidCompassTargetPos
-
getAngleFromEntityToPos
-
getWrappedVisualRotationY
-
hash
private static int hash(int pSeed) -
target
-