Package commoble.bagofyurting

# Class BagOfYurtingItem

java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<net.minecraft.world.item.Item>
net.minecraft.world.item.Item
commoble.bagofyurting.BagOfYurtingItem

All Implemented Interfaces:
  `net.minecraft.world.item.DyeableLeatherItem`, `net.minecraft.world.level.ItemLike`, `net.minecraftforge.common.extensions.IForgeItem`, `net.minecraftforge.registries.IForgeRegistryEntry<net.minecraft.world.item.Item>`

public class BagOfYurtingItem extends net.minecraft.world.item.Item implements net.minecraft.world.item.DyeableLeatherItem
This item collapses a portion of the Level into the item's internal storage when used on a block. The area area stored in the item is determined by the item's given radius. When used on a block on blockpos Q, the inclusive edges of the cuboid to store are as follows: x = [Q.x - radius, Q.x + radius] y = [Q.y, Q.y + 2 * radius] z = [Q.z - radius, Q.z + radius] e.g. if radius is 5 and the item is used on the block at xyz = {0,0,0}, the bounds of the cuboid will be x = [-5, 5] y = [0, 10] z = [-5, 5] When storing blocks in the bag, Q is defined as the block that the player activated with the bag. When unloading blocks from the bag, Q is defined as the block that the face the player activated faces. e.g. When storing blocks, the block that the player used the bag on will itself be stored in the bag, leaving air behind. and when unloading blocks, if the player uses the bag on the top face of the block that now faces that air block the stored blocks will be unloaded in their original positions Unloaded blocks are rotated based on the orientation of the player (rounded to a cardinal horizontal facing). When storing blocks in the bag, blocks that the player does not have permission to alter are ignored. When unloading blocks from the bag, if the player does not have permission to edit the entire relevant area, the unloading fails and all blocks remain in the bag. Permission mods may prevent a player from storing one block by canceling the BlockEvent.BreakEvent, and may prevent a player from unloading blocks by cancelling BlockEvent.EntityMultiPlaceEvent. There are three relevant block tags: "bagofyurting:blacklist", "bagofyurting:whitelist", and "bagofyurting:replaceable". If the whitelist tag is non-empty, only blocks that are in the whitelist but not in the blacklist can be stored in the bag. If the whitelist tag is empty, any block not in the blacklist can be stored in the bag. If a block is in the replaceable tag OR the block is air OR the block has a replaceable Material, then that block is allowed to be replaced by the contents of the bag when the bag is unloaded. Any unreplaceable blocks occupying a space that the bag would unload its contents into will cause the unloading to fail, and the bag's contents will remain in the bag. The minimum permission level to ignore these tags is adjustable in the mod's server config. Players in creative mode always ignore these tags.

## Nested Class Summary

## Nested classes/interfaces inherited from class net.minecraft.world.item.Item

`net.minecraft.world.item.Item.Properties`

## Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry

`net.minecraftforge.registries.ForgeRegistryEntry.UncheckedRegistryEntry<V extends net.minecraftforge.registries.IForgeRegistryEntry<V>>`

## Field Summary

Fields
Modifier and Type
Field
Description
`static String`
`RADIUS_KEY`
`static int`
`UNDYED_COLOR`

### Fields inherited from class net.minecraft.world.item.Item

`BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, category, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE`

### Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry

`delegate`

### Fields inherited from interface net.minecraft.world.item.DyeableLeatherItem

`DEFAULT_LEATHER_COLOR, TAG_COLOR, TAG_DISPLAY`

## Constructor Summary

Constructors
Constructor
Description
`BagOfYurtingItem​(net.minecraft.world.item.Item.Properties properties)`

## Method Summary

Modifier and Type
Method
Description
`void`
`appendHoverText​(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level LevelIn, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flagIn)`
allows items to add custom lines of information to the mouseover description
`void`
`fillItemCategory​(net.minecraft.world.item.CreativeModeTab group, net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items)`
returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
`int`
`getColor​(net.minecraft.world.item.ItemStack stack)`
`static Function<net.minecraft.server.MinecraftServer,​BagOfYurtingData>`
`getDataReader​(net.minecraft.world.item.ItemStack stack)`
Converting NBT to the map data can be expensive if the NBT is not present, returns a null supplier if the NBT is present, return a non-null supplier that generates the data
`int`
`getDiameter​(net.minecraft.world.item.ItemStack stack)`
`int`
`getRadius​(net.minecraft.world.item.ItemStack stack)`
`static net.minecraft.world.item.ItemStack`
`getUpgradeRecipeResult​(List<net.minecraft.world.item.ItemStack> inputs, net.minecraft.world.item.ItemStack baseOutput)`
`boolean`
`isFoil​(net.minecraft.world.item.ItemStack stack)`
`void`
`loadBag​(net.minecraft.server.MinecraftServer server, net.minecraft.world.item.context.UseOnContext context)`
`void`
`unloadBag​(net.minecraft.world.item.context.UseOnContext context, BagOfYurtingData data)`
`net.minecraft.world.InteractionResult`
`useOn​(net.minecraft.world.item.context.UseOnContext context)`
`net.minecraft.world.item.ItemStack`
`withRadius​(net.minecraft.world.item.ItemStack stack, int radius)`

### Methods inherited from class net.minecraft.world.item.Item

`allowdedIn, asItem, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getEquipSound, getFoodProperties, getHarvestLevel, getId, getItemCategory, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTags, getTooltipImage, getToolTypes, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, shouldOverrideMultiplayerNbt, toString, use, useOnRelease, verifyTagAfterLoad`

### Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry

`getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface net.minecraft.world.item.DyeableLeatherItem

`clearColor, hasCustomColor, setColor`

### Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem

`canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getArmorTexture, getAttributeModifiers, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getHighlightTip, getItemEnchantability, getItemStackLimit, getMaxDamage, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getXpRepairRatio, hasContainerItem, hasCustomEntity, initCapabilities, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isPiglinCurrency, isShield, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBar`

## Field Details

### RADIUS_KEY

public static final String RADIUS_KEY

See Also:
  Constant Field Values

### UNDYED_COLOR

public static final int UNDYED_COLOR

See Also:
  Constant Field Values

## Constructor Details

### BagOfYurtingItem

public BagOfYurtingItem​(net.minecraft.world.item.Item.Properties properties)

## Method Details

### isFoil

public boolean isFoil​(net.minecraft.world.item.ItemStack stack)

Overrides:
  `isFoil` in class `net.minecraft.world.item.Item`

### getRadius

public int getRadius​(net.minecraft.world.item.ItemStack stack)

### getDiameter

public int getDiameter​(net.minecraft.world.item.ItemStack stack)

### withRadius

public net.minecraft.world.item.ItemStack withRadius​(net.minecraft.world.item.ItemStack stack, int radius)

### fillItemCategory

public void fillItemCategory​(net.minecraft.world.item.CreativeModeTab group, net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items)
returns a list of items with the same ID, but different meta (eg: dye returns 16 items)

Overrides:
  `fillItemCategory` in class `net.minecraft.world.item.Item`

### getDataReader

@Nullable public static Function<net.minecraft.server.MinecraftServer,​BagOfYurtingData> getDataReader​(net.minecraft.world.item.ItemStack stack)
Converting NBT to the map data can be expensive if the NBT is not present, returns a null supplier if the NBT is present, return a non-null supplier that generates the data

### getColor

public int getColor​(net.minecraft.world.item.ItemStack stack)

Specified by:
  `getColor` in interface `net.minecraft.world.item.DyeableLeatherItem`

### useOn

public net.minecraft.world.InteractionResult useOn​(net.minecraft.world.item.context.UseOnContext context)

Overrides:
  `useOn` in class `net.minecraft.world.item.Item`

### loadBag

public void loadBag​(net.minecraft.server.MinecraftServer server, net.minecraft.world.item.context.UseOnContext context)

### unloadBag

public void unloadBag​(net.minecraft.world.item.context.UseOnContext context, BagOfYurtingData data)

### getUpgradeRecipeResult

public static net.minecraft.world.item.ItemStack getUpgradeRecipeResult​(List<net.minecraft.world.item.ItemStack> inputs, net.minecraft.world.item.ItemStack baseOutput)

### appendHoverText

public void appendHoverText​(net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.world.level.Level LevelIn, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flagIn)
allows items to add custom lines of information to the mouseover description

Overrides:
  `appendHoverText` in class `net.minecraft.world.item.Item`