commoble.bagofyurting

## Class BagOfYurtingItem

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

All Implemented Interfaces:
  net.minecraft.item.IDyeableArmorItem, net.minecraft.util.IItemProvider, net.minecraftforge.common.extensions.IForgeItem, net.minecraftforge.registries.IForgeRegistryEntry<net.minecraft.item.Item>

    public class BagOfYurtingItem
    extends net.minecraft.item.Item
    implements net.minecraft.item.IDyeableArmorItem

This item collapses a portion of the world 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.item.Item

`net.minecraft.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
`static java.lang.String` `RADIUS_KEY`
`static int` `UNDYED_COLOR`

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

`ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, BLOCK_TO_ITEM, canRepair, group, random`

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

`delegate`

### Constructor Summary

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

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `addInformation(net.minecraft.item.ItemStack stack, net.minecraft.world.World worldIn, java.util.List<net.minecraft.util.text.ITextComponent> tooltip, net.minecraft.client.util.ITooltipFlag flagIn)` allows items to add custom lines of information to the mouseover description
`void` `fillItemGroup(net.minecraft.item.ItemGroup group, net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> items)` returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
`int` `getColor(net.minecraft.item.ItemStack stack)`
`static java.util.function.Function<net.minecraft.server.MinecraftServer,BagOfYurtingData>` `getDataReader(net.minecraft.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.item.ItemStack stack)`
`int` `getRadius(net.minecraft.item.ItemStack stack)`
`static net.minecraft.item.ItemStack` `getUpgradeRecipeResult(java.util.List<net.minecraft.item.ItemStack> inputs, net.minecraft.item.ItemStack baseOutput)`
`boolean` `hasEffect(net.minecraft.item.ItemStack stack)`
`void` `loadBag(net.minecraft.server.MinecraftServer server, net.minecraft.item.ItemUseContext context)`
`net.minecraft.util.ActionResultType` `onItemUse(net.minecraft.item.ItemUseContext context)`
`void` `unloadBag(net.minecraft.item.ItemUseContext context, BagOfYurtingData data)`
`net.minecraft.item.ItemStack` `withRadius(net.minecraft.item.ItemStack stack, int radius)`

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

`asItem, canHarvestBlock, canPlayerBreakBlockWhileHolding, getAttributeModifiers, getContainerItem, getDefaultInstance, getDefaultTranslationKey, getDestroySpeed, getDisplayName, getDrinkSound, getEatSound, getFood, getGroup, getHarvestLevel, getIdFromItem, getIsRepairable, getItemById, getItemEnchantability, getItemFromBlock, getItemStackTileEntityRenderer, getMaxDamage, getMaxStackSize, getName, getRarity, getTags, getToolTypes, getTranslationKey, getTranslationKey, getUseAction, getUseDuration, hasContainerItem, hitEntity, inventoryTick, isComplex, isCrossbow, isDamageable, isDamageable, isEnchantable, isFood, isImmuneToFire, isIn, isInGroup, isRepairable, itemInteractionForEntity, onBlockDestroyed, onCreated, onItemRightClick, onItemUseFinish, onPlayerStoppedUsing, onUse, rayTrace, shouldSyncTag, toString, updateItemStackNBT`

### 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.item.IDyeableArmorItem

`dyeItem, hasColor, removeColor, setColor`

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

`canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getArmorModel, getArmorTexture, getAttributeModifiers, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getHighlightTip, getItem, 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, renderHelmetOverlay, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBar`

### Field Detail

#### RADIUS_KEY

    public static final java.lang.String RADIUS_KEY

See Also:
  Constant Field Values

#### UNDYED_COLOR

    public static final int UNDYED_COLOR

See Also:
  Constant Field Values

### Constructor Detail

#### BagOfYurtingItem

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

### Method Detail

#### hasEffect

    public boolean hasEffect(net.minecraft.item.ItemStack stack)

Overrides:
  `hasEffect` in class `net.minecraft.item.Item`

#### getRadius

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

#### getDiameter

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

#### withRadius

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

#### fillItemGroup

    public void fillItemGroup(net.minecraft.item.ItemGroup group,
                              net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> items)

returns a list of items with the same ID, but different meta (eg: dye returns 16 items)

Overrides:
  `fillItemGroup` in class `net.minecraft.item.Item`

#### getDataReader

    @Nullable
    public static java.util.function.Function<net.minecraft.server.MinecraftServer,BagOfYurtingData> getDataReader(net.minecraft.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.item.ItemStack stack)

Specified by:
  `getColor` in interface `net.minecraft.item.IDyeableArmorItem`

#### onItemUse

    public net.minecraft.util.ActionResultType onItemUse(net.minecraft.item.ItemUseContext context)

Overrides:
  `onItemUse` in class `net.minecraft.item.Item`

#### loadBag

    public void loadBag(net.minecraft.server.MinecraftServer server,
                        net.minecraft.item.ItemUseContext context)

#### unloadBag

    public void unloadBag(net.minecraft.item.ItemUseContext context,
                          BagOfYurtingData data)

#### getUpgradeRecipeResult

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

#### addInformation

    public void addInformation(net.minecraft.item.ItemStack stack,
                               @Nullable
                               net.minecraft.world.World worldIn,
                               java.util.List<net.minecraft.util.text.ITextComponent> tooltip,
                               net.minecraft.client.util.ITooltipFlag flagIn)

allows items to add custom lines of information to the mouseover description

Overrides:
  `addInformation` in class `net.minecraft.item.Item`