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 wobble, CompassAngleState.CompassTarget compassTarget) -
Method Summary
Modifier and TypeMethodDescriptionprotected floatcalculate(ItemStack p_388108_, ClientLevel p_387750_, int p_388073_, ItemOwner p_435973_) private static doublegetAngleFromEntityToPos(ItemOwner owner, BlockPos pos) private floatgetRandomlySpinningRotation(int seed, long gameTime) private floatgetRotationTowardsCompassTarget(ItemOwner owner, long gameTime, BlockPos pos) private static floatprivate static inthash(int seed) private static booleanisValidCompassTargetPos(ItemOwner owner, @Nullable GlobalPos pos) 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
protected float calculate(ItemStack p_388108_, ClientLevel p_387750_, int p_388073_, ItemOwner p_435973_) - Specified by:
calculatein classNeedleDirectionHelper
-
getRandomlySpinningRotation
private float getRandomlySpinningRotation(int seed, long gameTime) -
getRotationTowardsCompassTarget
-
isValidCompassTargetPos
-
getAngleFromEntityToPos
-
getWrappedVisualRotationY
-
hash
private static int hash(int seed) -
target
-