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 voidappendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context)static voidcopyMap(World world, ItemStack stack)static ItemStackcreateMap(World world, int x, int z, byte scale, boolean showIcons, boolean unlimitedTracking)private static voidcreateMapState(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 voidfillExplorationMap(ServerWorld world, ItemStack map)private BlockStategetFluidStateIfVisible(World world, BlockState state, BlockPos pos)static intgetMapColor(ItemStack stack)static IntegergetMapId(ItemStack stack)static StringgetMapName(int mapId)static MapStategetMapState(Integer integer, World world)static MapStategetOrCreateMapState(ItemStack map, World world)private static booleanhasPositiveDepth(Biome[] biomes, int scale, int x, int z)voidinventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected)private static intmethod_32349(World world, int int2, int int3, int int4, boolean bool, boolean bool2, RegistryKey<World> registryKey)voidonCraft(ItemStack stack, World world, PlayerEntity player)Called when a player acquires the item by crafting, smelting, smithing, etc.private static voidscale(ItemStack map, World world, int amount)private static voidsetMapId(ItemStack stack, int id)voidupdateColors(World world, Entity entity, MapState state)ActionResultuseOnBlock(ItemUsageContext context)Called when an item is used on a block.Methods inherited from class net.minecraft.item.NetworkSyncedItem
isNetworkSyncedMethods 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:
inventoryTickin classItem
-
createSyncPacket
Creates a packet that syncs additional item data to the client.- Overrides:
createSyncPacketin 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:
appendTooltipin 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:
useOnBlockin classItem- Parameters:
context- the usage context- Returns:
- an action result that specifies if using the item on a block was successful.
-