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
,IForgeItem
-
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_42910_, Level p_42911_) static Integer
static MapItemSavedData
getSavedData
(Integer p_151129_, Level p_151130_) static MapItemSavedData
getSavedData
(ItemStack p_42854_, Level p_42855_) 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
onCraftedBy
(ItemStack p_42913_, Level p_42914_, Player p_42915_) 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, getEquipSound, 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, 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.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, 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
-
onCraftedBy
- Overrides:
onCraftedBy
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
-
getColor
-
useOn
-