Package net.minecraft.item
Class FilledMapItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.NetworkSyncedItem
net.minecraft.item.FilledMapItem
- All Implemented Interfaces:
ItemConvertible
public class FilledMapItem extends NetworkSyncedItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.Settings
-
Field Summary
Fields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group
-
Constructor Summary
Constructors Constructor Description FilledMapItem(Item.Settings settings)
-
Method Summary
Modifier and Type Method Description void
appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context)
static void
copyMap(World world, ItemStack stack)
static ItemStack
createMap(World world, int x, int z, byte scale, boolean showIcons, boolean unlimitedTracking)
private static void
createMapState(ItemStack stack, World world, int x, int z, int scale, boolean showIcons, boolean unlimitedTracking, RegistryKey<World> dimension)
Packet<?>
createSyncPacket(ItemStack stack, World world, PlayerEntity player)
Creates a packet that syncs additional item data to the client.static void
fillExplorationMap(ServerWorld world, ItemStack map)
private BlockState
getFluidStateIfVisible(World world, BlockState state, BlockPos pos)
static int
getMapColor(ItemStack stack)
static Integer
getMapId(ItemStack stack)
static String
getMapName(int mapId)
static MapState
getMapState(Integer integer, World world)
static MapState
getOrCreateMapState(ItemStack map, World world)
private static boolean
hasPositiveDepth(Biome[] biomes, int scale, int x, int z)
void
inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected)
private static int
method_32349(World world, int int2, int int3, int int4, boolean bool, boolean bool2, RegistryKey<World> registryKey)
void
onCraft(ItemStack stack, World world, PlayerEntity player)
Called when a player acquires the item by crafting, smelting, smithing, etc.private static void
scale(ItemStack map, World world, int amount)
private static void
setMapId(ItemStack stack, int id)
void
updateColors(World world, Entity entity, MapState state)
ActionResult
useOnBlock(ItemUsageContext context)
Called when an item is used on a block.Methods inherited from class net.minecraft.item.NetworkSyncedItem
isNetworkSynced
Methods inherited from class net.minecraft.item.Item
appendStacks, asItem, byRawId, canMine, canRepair, damage, finishUsing, fromBlock, getAttributeModifiers, getDefaultStack, getDrinkSound, getEatSound, getEnchantability, getEquipSound, getFoodComponent, getGroup, getItemBarColor, getItemBarStep, getMaxCount, getMaxDamage, getMaxUseTime, getMiningSpeedMultiplier, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getTooltipData, getTranslationKey, getTranslationKey, getUseAction, hasGlint, hasRecipeRemainder, hasStoredInventory, isDamageable, isEnchantable, isFireproof, isFood, isIn, isItemBarVisible, isSuitableFor, isUsedOnRelease, method_33261, onClicked, onStackClicked, onStoppedUsing, postHit, postMine, postProcessTag, raycast, shouldSyncTagToClient, toString, usageTick, use, useOnEntity
-
Constructor Details
-
FilledMapItem
-
-
Method Details
-
createMap
-
getMapState
-
getOrCreateMapState
-
getMapId
-
method_32349
private static int method_32349(World world, int int2, int int3, int int4, boolean bool, boolean bool2, RegistryKey<World> registryKey) -
setMapId
-
createMapState
private static void createMapState(ItemStack stack, World world, int x, int z, int scale, boolean showIcons, boolean unlimitedTracking, RegistryKey<World> dimension) -
getMapName
-
updateColors
-
getFluidStateIfVisible
-
hasPositiveDepth
-
fillExplorationMap
-
inventoryTick
- Overrides:
inventoryTick
in classItem
-
createSyncPacket
Creates a packet that syncs additional item data to the client.- Overrides:
createSyncPacket
in classNetworkSyncedItem
-
onCraft
Called when a player acquires the item by crafting, smelting, smithing, etc. -
scale
-
copyMap
-
appendTooltip
@Environment(CLIENT) public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context)- Overrides:
appendTooltip
in classItem
-
getMapColor
-
useOnBlock
Called when an item is used on a block.This method is called on both the logical client and logical server, so take caution when using this method. The logical side can be checked using
context.getWorld().isClient()
.- Overrides:
useOnBlock
in classItem
- Parameters:
context
- the usage context- Returns:
- an action result that specifies if using the item on a block was successful.
-