Package net.minecraft.world.item
Class MapItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ComplexItem
net.minecraft.world.item.MapItem
- All Implemented Interfaces:
FeatureElement
,ItemLike
,IItemExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
static final int
static final int
static final String
static final String
private static final String
Fields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendHoverText
(ItemStack p_42880_, Level p_42881_, List<Component> p_42882_, TooltipFlag p_42883_) static ItemStack
create
(Level p_42887_, int p_42888_, int p_42889_, byte p_42890_, boolean p_42891_, boolean p_42892_) private static void
createAndStoreSavedData
(ItemStack p_151112_, Level p_151113_, int p_151114_, int p_151115_, int p_151116_, boolean p_151117_, boolean p_151118_, ResourceKey<Level> p_151119_) private static int
createNewSavedData
(Level p_151121_, int p_151122_, int p_151123_, int p_151124_, boolean p_151125_, boolean p_151126_, ResourceKey<Level> p_151127_) static int
private BlockState
getCorrectStateForFluidBlock
(Level p_42901_, BlockState p_42902_, BlockPos p_42903_) protected MapItemSavedData
getCustomMapData
(ItemStack p_42854_, Level p_42855_) static Integer
static MapItemSavedData
getSavedData
(Integer p_151129_, Level p_151130_) static MapItemSavedData
getSavedData
(ItemStack p_42854_, Level p_42855_) private static Component
getTooltipForId
(int p_302004_) static Component
getTooltipForId
(ItemStack p_301990_) Packet<?>
getUpdatePacket
(ItemStack p_42876_, Level p_42877_, Player p_42878_) void
inventoryTick
(ItemStack p_42870_, Level p_42871_, Entity p_42872_, int p_42873_, boolean p_42874_) private static boolean
isBiomeWatery
(boolean[] p_212252_, int p_212253_, int p_212254_) static void
static String
makeKey
(int p_42849_) void
onCraftedPostProcess
(ItemStack p_42913_, Level p_42914_) static void
renderBiomePreviewMap
(ServerLevel p_42851_, ItemStack p_42852_) private static void
private static void
storeMapData
(ItemStack p_151109_, int p_151110_) void
update
(Level p_42894_, Entity p_42895_, MapItemSavedData p_42896_) useOn
(UseOnContext p_42885_) Methods inherited from class net.minecraft.world.item.ComplexItem
isComplex
Methods inherited from class net.minecraft.world.item.Item
asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, isBarVisible, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, useOnRelease, verifyTagAfterLoad
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtension
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
Field Details
-
IMAGE_WIDTH
public static final int IMAGE_WIDTH- See Also:
-
IMAGE_HEIGHT
public static final int IMAGE_HEIGHT- See Also:
-
DEFAULT_MAP_COLOR
private static final int DEFAULT_MAP_COLOR- See Also:
-
TAG_MAP
- See Also:
-
MAP_SCALE_TAG
- See Also:
-
MAP_LOCK_TAG
- See Also:
-
-
Constructor Details
-
MapItem
-
-
Method Details
-
create
-
getSavedData
-
getSavedData
-
getCustomMapData
-
getMapId
-
createNewSavedData
private static int createNewSavedData(Level p_151121_, int p_151122_, int p_151123_, int p_151124_, boolean p_151125_, boolean p_151126_, ResourceKey<Level> p_151127_) -
storeMapData
-
createAndStoreSavedData
private static void createAndStoreSavedData(ItemStack p_151112_, Level p_151113_, int p_151114_, int p_151115_, int p_151116_, boolean p_151117_, boolean p_151118_, ResourceKey<Level> p_151119_) -
makeKey
-
update
-
getCorrectStateForFluidBlock
private BlockState getCorrectStateForFluidBlock(Level p_42901_, BlockState p_42902_, BlockPos p_42903_) -
isBiomeWatery
private static boolean isBiomeWatery(boolean[] p_212252_, int p_212253_, int p_212254_) -
renderBiomePreviewMap
-
inventoryTick
public void inventoryTick(ItemStack p_42870_, Level p_42871_, Entity p_42872_, int p_42873_, boolean p_42874_) - Overrides:
inventoryTick
in classItem
-
getUpdatePacket
- Overrides:
getUpdatePacket
in classComplexItem
-
onCraftedPostProcess
- Overrides:
onCraftedPostProcess
in classItem
-
scaleMap
-
lockMap
-
appendHoverText
public void appendHoverText(ItemStack p_42880_, @Nullable Level p_42881_, List<Component> p_42882_, TooltipFlag p_42883_) - Overrides:
appendHoverText
in classItem
-
getTooltipForId
-
getTooltipForId
-
getColor
-
useOn
-