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 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 itemStack, ClientLevel level, int seed, ItemOwner owner) private static doublegetAngleFromEntityToPos(ItemOwner owner, BlockPos position) private floatgetRandomlySpinningRotation(int seed, long gameTime) private floatgetRotationTowardsCompassTarget(ItemOwner owner, long gameTime, BlockPos compassTargetPos) private static floatprivate static inthash(int input) private static booleanisValidCompassTargetPos(ItemOwner owner, @Nullable GlobalPos positionToPointTo) protected CompassAngleState.CompassTargettarget()Methods inherited from class 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 seed, long gameTime) -
getRotationTowardsCompassTarget
-
isValidCompassTargetPos
-
getAngleFromEntityToPos
-
getWrappedVisualRotationY
-
hash
private static int hash(int input) -
target
-