Class BasicLootBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
net.tearpelato.deco_lib.api.block_entity.BasicLootBlockEntity
- All Implemented Interfaces:
Iterable<net.minecraft.world.item.ItemStack>, net.minecraft.core.TypedInstance<net.minecraft.world.level.block.entity.BlockEntityType<?>>, net.minecraft.util.debug.DebugValueSource, net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.entity.SlotProvider, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.minecraft.world.Nameable, net.minecraft.world.RandomizableContainer, net.minecraft.world.WorldlyContainer, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.ContainerExtension, net.neoforged.neoforge.common.extensions.IBlockEntityExtension, net.neoforged.neoforge.common.extensions.IMenuProviderExtension, net.neoforged.neoforge.common.extensions.TypedInstanceExtension<net.minecraft.world.level.block.entity.BlockEntityType<?>>, net.neoforged.neoforge.registries.datamaps.IWithData<net.minecraft.world.level.block.entity.BlockEntityType<?>>
public abstract class BasicLootBlockEntity
extends net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
implements net.minecraft.world.WorldlyContainer
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsFieldNested classes/interfaces inherited from interface net.minecraft.world.Container
net.minecraft.world.Container.ContainerIteratorNested classes/interfaces inherited from interface net.minecraft.util.debug.DebugValueSource
net.minecraft.util.debug.DebugValueSource.Registration, net.minecraft.util.debug.DebugValueSource.ValueGetter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> protected final net.minecraft.world.level.block.entity.ContainerOpenersCounterFields inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
lootTable, lootTableSeedFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFERFields inherited from interface net.minecraft.world.RandomizableContainer
LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG -
Constructor Summary
ConstructorsConstructorDescriptionBasicLootBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddItem(net.minecraft.world.item.ItemStack stack) booleancanPlaceItemThroughFace(int i, net.minecraft.world.item.ItemStack itemStack, @Nullable net.minecraft.core.Direction direction) booleancanTakeItemThroughFace(int i, net.minecraft.world.item.ItemStack itemStack, net.minecraft.core.Direction direction) protected abstract net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int windowId, net.minecraft.world.entity.player.Inventory playerInventory) abstract intprotected abstract net.minecraft.network.chat.Componentprotected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()int[]getSlotsForFace(net.minecraft.core.Direction direction) booleanisEmpty()booleanisFull()booleanisMatchingContainerMenu(net.minecraft.world.inventory.AbstractContainerMenu menu) voidloadAdditional(net.minecraft.world.level.storage.ValueInput input) voidonClose(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) voidonOpen(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) protected voidsaveAdditional(net.minecraft.world.level.storage.ValueOutput output) protected voidsetItems(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items) voidMethods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
applyImplicitComponents, canOpen, collectImplicitComponents, createMenu, getItem, getLootTable, getLootTableSeed, removeComponentsFromTag, removeItem, removeItemNoUpdate, setItem, setLootTable, setLootTableSeedMethods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
clearContent, getCustomName, getDisplayName, getName, isLocked, sendChestLockedNotifications, setItem, stillValidMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getAndClearAttachmentTypesToSync, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, preRemoveSideEffects, problemPath, registerDebugValues, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, triggerEvent, typeHolderMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Clearable
clearContentMethods inherited from interface net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getEntitiesWithContainerOpen, getItem, getMaxStackSize, getMaxStackSize, getSlot, hasAnyMatching, hasAnyOf, iterator, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpenMethods inherited from interface net.neoforged.neoforge.common.extensions.ContainerExtension
onTransfer, setItemMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
applyStructureRotation, getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdateMethods inherited from interface net.neoforged.neoforge.common.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen, writeClientSideDataMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.world.Nameable
getPlainTextName, hasCustomNameMethods inherited from interface net.minecraft.world.RandomizableContainer
getBlockPos, getLevel, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTableMethods inherited from interface net.minecraft.world.entity.SlotProvider
getSlotsFromRangeMethods inherited from interface net.minecraft.core.TypedInstance
is, is, is, is, is, tagsMethods inherited from interface net.neoforged.neoforge.common.extensions.TypedInstanceExtension
getData
-
Field Details
-
items
protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items -
openersCounter
protected final net.minecraft.world.level.block.entity.ContainerOpenersCounter openersCounter
-
-
Constructor Details
-
BasicLootBlockEntity
public BasicLootBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
getContainerSize
public abstract int getContainerSize()- Specified by:
getContainerSizein interfacenet.minecraft.world.Container
-
isMatchingContainerMenu
public boolean isMatchingContainerMenu(net.minecraft.world.inventory.AbstractContainerMenu menu) -
getItems
protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()- Specified by:
getItemsin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
setItems
protected void setItems(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items) - Specified by:
setItemsin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getDefaultName
protected abstract net.minecraft.network.chat.Component getDefaultName()- Specified by:
getDefaultNamein classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
addItem
protected boolean addItem(net.minecraft.world.item.ItemStack stack) -
createMenu
protected abstract net.minecraft.world.inventory.AbstractContainerMenu createMenu(int windowId, net.minecraft.world.entity.player.Inventory playerInventory) - Specified by:
createMenuin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacenet.minecraft.world.Container- Overrides:
isEmptyin classnet.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
-
isFull
public boolean isFull() -
saveAdditional
protected void saveAdditional(net.minecraft.world.level.storage.ValueOutput output) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
loadAdditional
public void loadAdditional(net.minecraft.world.level.storage.ValueInput input) - Overrides:
loadAdditionalin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getSlotsForFace
public int[] getSlotsForFace(net.minecraft.core.Direction direction) - Specified by:
getSlotsForFacein interfacenet.minecraft.world.WorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int i, net.minecraft.world.item.ItemStack itemStack, @Nullable @Nullable net.minecraft.core.Direction direction) - Specified by:
canPlaceItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
canTakeItemThroughFace
public boolean canTakeItemThroughFace(int i, net.minecraft.world.item.ItemStack itemStack, net.minecraft.core.Direction direction) - Specified by:
canTakeItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
updateOpenerCount
public void updateOpenerCount() -
onOpen
public void onOpen(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
onClose
public void onClose(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-