Class BookshelfBlockEntity
java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
com.binaris.wizardry.content.blockentity.BookshelfBlockEntity
- All Implemented Interfaces:
dev.onyxstudios.cca.api.v3.component.ComponentAccess,net.fabricmc.fabric.api.attachment.v1.AttachmentTarget,net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity,net.fabricmc.fabric.api.screenhandler.v1.FabricScreenHandlerFactory,net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.MenuProvider,net.minecraft.world.Nameable
public class BookshelfBlockEntity
extends net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
-
Field Summary
Fields inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG, lootTable, lootTableSeedFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
NBT_ATTACHMENT_KEYFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionBookshelfBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlaceItem(int slotNumber, net.minecraft.world.item.ItemStack stack) protected @NotNull net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int i, @NotNull net.minecraft.world.entity.player.Inventory inventory) intprotected @NotNull net.minecraft.network.chat.Componentprotected @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>getItems()@Nullable net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener>@NotNull net.minecraft.nbt.CompoundTagvoidload(@NotNull net.minecraft.nbt.CompoundTag tag) protected voidsaveAdditional(@NotNull net.minecraft.nbt.CompoundTag tag) voidvoidsetItem(int slot, @NotNull net.minecraft.world.item.ItemStack stack) protected voidsetItems(@NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> stacks) booleanstillValid(@NotNull net.minecraft.world.entity.player.Player player) Methods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
canOpen, clearContent, createMenu, getItem, isEmpty, removeItem, removeItemNoUpdate, setLootTable, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTableMethods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, getCustomName, getDisplayName, getName, setCustomNameMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, removeAttached, setAttachedMethods inherited from interface dev.onyxstudios.cca.api.v3.component.ComponentAccess
asComponentProvider, getComponent, syncComponent, syncComponent, syncComponentMethods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, getMaxStackSize, hasAnyMatching, hasAnyOf, startOpen, stopOpenMethods inherited from interface net.fabricmc.fabric.api.screenhandler.v1.FabricScreenHandlerFactory
shouldCloseCurrentScreenMethods inherited from interface net.minecraft.world.Nameable
hasCustomNameMethods inherited from interface net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity
getRenderData
-
Constructor Details
-
BookshelfBlockEntity
public BookshelfBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
getDefaultName
@NotNull protected @NotNull net.minecraft.network.chat.Component getDefaultName()- Specified by:
getDefaultNamein classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getItems
@NotNull protected @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()- Specified by:
getItemsin classnet.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
-
setItems
protected void setItems(@NotNull @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> stacks) - Specified by:
setItemsin classnet.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
-
createMenu
@NotNull protected @NotNull net.minecraft.world.inventory.AbstractContainerMenu createMenu(int i, @NotNull @NotNull net.minecraft.world.entity.player.Inventory inventory) - Specified by:
createMenuin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getContainerSize
public int getContainerSize() -
setItem
public void setItem(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack) - Specified by:
setItemin interfacenet.minecraft.world.Container- Overrides:
setItemin classnet.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
-
setChanged
public void setChanged()- Specified by:
setChangedin interfacenet.minecraft.world.Container- Overrides:
setChangedin classnet.minecraft.world.level.block.entity.BlockEntity
-
stillValid
public boolean stillValid(@NotNull @NotNull net.minecraft.world.entity.player.Player player) - Specified by:
stillValidin interfacenet.minecraft.world.Container- Overrides:
stillValidin classnet.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
-
canPlaceItem
public boolean canPlaceItem(int slotNumber, net.minecraft.world.item.ItemStack stack) -
load
public void load(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
saveAdditional
protected void saveAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getUpdateTag
@NotNull public @NotNull net.minecraft.nbt.CompoundTag getUpdateTag()- Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdatePacket
@Nullable public @Nullable net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener> getUpdatePacket()- Overrides:
getUpdatePacketin classnet.minecraft.world.level.block.entity.BlockEntity
-