Class LootCrateBlockEntity
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.li64.tide.registries.blocks.entities.LootCrateBlockEntity
- All Implemented Interfaces:
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
- Direct Known Subclasses:
EndLootCrateBlockEntity,ObsidianLootCrateBlockEntity,SurfaceLootCrateBlockEntity
public abstract class LootCrateBlockEntity
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
ConstructorsConstructorDescriptionLootCrateBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<? extends LootCrateBlockEntity> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionprotected net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int p_58598_, net.minecraft.world.entity.player.Inventory p_58599_) intprotected net.minecraft.network.chat.Componentprotected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>getItems()voidload(net.minecraft.nbt.CompoundTag tag) voidprotected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) protected voidsetItems(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> p_58610_) voidstartOpen(net.minecraft.world.entity.player.Player p_58616_) voidstopOpen(net.minecraft.world.entity.player.Player p_58614_) Methods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
canOpen, clearContent, createMenu, getItem, isEmpty, removeItem, removeItemNoUpdate, setItem, setLootTable, setLootTable, stillValid, 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, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, 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 net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getMaxStackSize, hasAnyMatching, hasAnyOf, setChangedMethods 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
-
LootCrateBlockEntity
public LootCrateBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<? extends LootCrateBlockEntity> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
saveAdditional
protected void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
load
public void load(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getContainerSize
public int getContainerSize() -
getItems
protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()- Specified by:
getItemsin classnet.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
-
setItems
protected void setItems(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> p_58610_) - Specified by:
setItemsin classnet.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
-
getDefaultName
protected net.minecraft.network.chat.Component getDefaultName()- Specified by:
getDefaultNamein classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
createMenu
protected net.minecraft.world.inventory.AbstractContainerMenu createMenu(int p_58598_, net.minecraft.world.entity.player.Inventory p_58599_) - Specified by:
createMenuin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
startOpen
public void startOpen(net.minecraft.world.entity.player.Player p_58616_) -
stopOpen
public void stopOpen(net.minecraft.world.entity.player.Player p_58614_) -
recheckOpen
public void recheckOpen()
-