public class CompassItem extends Item implements Vanishable
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
CompassItem.AngleRandomizer |
Item.SettingsATTACK_DAMAGE_MODIFIER_UUID, ATTACK_SPEED_MODIFIER_UUID, BLOCK_ITEMS, group, RANDOM| Constructor and Description |
|---|
CompassItem(Item.Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
private static double |
getAngleToPos(Vec3d pos,
Entity entity) |
private static double |
getItemFrameAngleOffset(ItemFrameEntity itemFrame) |
private static Optional<DimensionType> |
getLodestoneDimension(CompoundTag tag) |
private BlockPos |
getLodestonePos(World world,
CompoundTag tag) |
private BlockPos |
getSpawnPos(World world) |
String |
getTranslationKey(ItemStack stack) |
boolean |
hasEnchantmentGlint(ItemStack stack) |
private static boolean |
hasLodestone(CompoundTag tag) |
private static boolean |
hasLodestone(ItemStack stack) |
void |
inventoryTick(ItemStack stack,
World world,
Entity entity,
int slot,
boolean selected) |
ActionResult |
useOnBlock(ItemUsageContext context) |
addPropertyGetter, appendStacks, appendTooltip, asItem, byRawId, canMine, canRepair, damage, finishUsing, fromBlock, getDrinkSound, getEatSound, getEnchantability, getFoodComponent, getGroup, getMaxCount, getMaxDamage, getMaxUseTime, getMiningSpeedMultiplier, getModifiers, getName, getName, getOrCreateTranslationKey, getPropertyGetter, getRarity, getRawId, getRecipeRemainder, getStackForRender, getTranslationKey, getUseAction, hasPropertyGetters, hasRecipeRemainder, isDamageable, isEffectiveOn, isEnchantable, isFireproof, isFood, isIn, isIn, isNetworkSynced, isUsedOnRelease, onCraft, onStoppedUsing, postHit, postMine, postProcessTag, rayTrace, shouldSyncTagToClient, toString, usageTick, use, useOnEntitypublic CompassItem(Item.Settings settings)
private static boolean hasLodestone(CompoundTag tag)
private static boolean hasLodestone(ItemStack stack)
public boolean hasEnchantmentGlint(ItemStack stack)
hasEnchantmentGlint in class Itemprivate static Optional<DimensionType> getLodestoneDimension(CompoundTag tag)
@Environment(value=CLIENT) @Nullable private BlockPos getLodestonePos(World world, CompoundTag tag)
@Environment(value=CLIENT) private static double getItemFrameAngleOffset(ItemFrameEntity itemFrame)
@Environment(value=CLIENT) private static double getAngleToPos(Vec3d pos, Entity entity)
public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected)
inventoryTick in class Itempublic ActionResult useOnBlock(ItemUsageContext context)
useOnBlock in class Itempublic String getTranslationKey(ItemStack stack)
getTranslationKey in class Item