Class AbstractBotanyPotBlockEntity
java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
net.darkhax.botanypots.common.impl.block.entity.AbstractBotanyPotBlockEntity
- 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,net.minecraft.world.RandomizableContainer,net.minecraft.world.WorldlyContainer
- Direct Known Subclasses:
BotanyPotBlockEntity
public abstract class AbstractBotanyPotBlockEntity
extends net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
implements net.minecraft.world.WorldlyContainer
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected net.darkhax.bookshelf.common.api.function.CachedSupplier<net.minecraft.core.BlockPos> static final net.minecraft.network.chat.Componentstatic final int[]protected net.darkhax.bookshelf.common.api.function.CachedSupplier<PotType> static final intstatic final intstatic final intstatic final int[]static final intFields 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 interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
NBT_ATTACHMENT_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
ConstructorsModifierConstructorDescriptionprotectedAbstractBotanyPotBlockEntity(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 TypeMethodDescriptionbooleancanPlaceItemThroughFace(int slot, @NotNull net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.Direction side) booleancanTakeItemThroughFace(int slot, @NotNull net.minecraft.world.item.ItemStack stack, @NotNull net.minecraft.core.Direction side) @Nullable net.minecraft.commands.CommandSourceStackintprotected @NotNull net.minecraft.network.chat.Componentnet.minecraft.world.item.ItemStackprotected @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()net.minecraft.world.item.ItemStackint @NotNull []getSlotsForFace(@NotNull net.minecraft.core.Direction side) net.minecraft.world.item.ItemStackbooleanisHopper()voidloadAdditional(@NotNull net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) voidabstract voidonSeedChanged(net.minecraft.world.item.ItemStack newStack) abstract voidonSoilChanged(net.minecraft.world.item.ItemStack newStack) abstract voidonToolChanged(net.minecraft.world.item.ItemStack newStack) voidrunFunction(net.minecraft.resources.ResourceLocation functionId) voidsaveAdditional(@NotNull net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) voidsetHoe(net.minecraft.world.item.ItemStack hoeStack) voidsetItem(int slotId, @NotNull net.minecraft.world.item.ItemStack stack) protected voidsetItems(@NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> newItems) voidsetSeed(net.minecraft.world.item.ItemStack newSeed) voidsetSoilItem(net.minecraft.world.item.ItemStack newSoil) Methods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
applyImplicitComponents, canOpen, collectImplicitComponents, createMenu, getItem, getLootTable, getLootTableSeed, isEmpty, removeComponentsFromTag, removeItem, removeItemNoUpdate, setLootTable, setLootTableSeedMethods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, clearContent, createMenu, getCustomName, getDisplayName, getName, stillValidMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, 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.Clearable
clearContentMethods inherited from interface net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, removeItem, removeItemNoUpdate, setChanged, startOpen, stillValid, stopOpenMethods inherited from interface net.fabricmc.fabric.api.screenhandler.v1.FabricScreenHandlerFactory
shouldCloseCurrentScreenMethods inherited from interface net.minecraft.world.Nameable
hasCustomNameMethods inherited from interface net.minecraft.world.RandomizableContainer
getBlockPos, getLevel, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTableMethods inherited from interface net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity
getRenderData
-
Field Details
-
SOIL_SLOT
public static final int SOIL_SLOT- See Also:
-
SEED_SLOT
public static final int SEED_SLOT- See Also:
-
TOOL_SLOT
public static final int TOOL_SLOT- See Also:
-
SLOT_COUNT
public static final int SLOT_COUNT- See Also:
-
STORAGE_SLOTS
public static final int[] STORAGE_SLOTS -
EMPTY_SLOTS
public static final int[] EMPTY_SLOTS -
DEFAULT_NAME
public static final net.minecraft.network.chat.Component DEFAULT_NAME -
below
protected net.darkhax.bookshelf.common.api.function.CachedSupplier<net.minecraft.core.BlockPos> below -
potType
-
-
Constructor Details
-
AbstractBotanyPotBlockEntity
protected AbstractBotanyPotBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
onSoilChanged
public abstract void onSoilChanged(net.minecraft.world.item.ItemStack newStack) -
onSeedChanged
public abstract void onSeedChanged(net.minecraft.world.item.ItemStack newStack) -
onToolChanged
public abstract void onToolChanged(net.minecraft.world.item.ItemStack newStack) -
getPotType
-
isHopper
public boolean isHopper() -
getSoilItem
public net.minecraft.world.item.ItemStack getSoilItem() -
setSoilItem
public void setSoilItem(net.minecraft.world.item.ItemStack newSoil) -
getSeedItem
public net.minecraft.world.item.ItemStack getSeedItem() -
setSeed
public void setSeed(net.minecraft.world.item.ItemStack newSeed) -
getHarvestItem
public net.minecraft.world.item.ItemStack getHarvestItem() -
setHoe
public void setHoe(net.minecraft.world.item.ItemStack hoeStack) -
runFunction
public void runFunction(net.minecraft.resources.ResourceLocation functionId) -
createCommandSourceStack
@Nullable public @Nullable net.minecraft.commands.CommandSourceStack createCommandSourceStack() -
loadAdditional
public void loadAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag, @NotNull net.minecraft.core.HolderLookup.Provider registries) - Overrides:
loadAdditionalin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
saveAdditional
public void saveAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag, @NotNull net.minecraft.core.HolderLookup.Provider registries) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
markUpdated
public void markUpdated() -
setItem
public void setItem(int slotId, @NotNull @NotNull net.minecraft.world.item.ItemStack stack) - Specified by:
setItemin interfacenet.minecraft.world.Container- Overrides:
setItemin classnet.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
-
getSlotsForFace
public int @NotNull [] getSlotsForFace(@NotNull @NotNull net.minecraft.core.Direction side) - Specified by:
getSlotsForFacein interfacenet.minecraft.world.WorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.core.Direction side) - Specified by:
canPlaceItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
canTakeItemThroughFace
public boolean canTakeItemThroughFace(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, @NotNull @NotNull net.minecraft.core.Direction side) - Specified by:
canTakeItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
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.BaseContainerBlockEntity
-
setItems
protected void setItems(@NotNull @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> newItems) - Specified by:
setItemsin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfacenet.minecraft.world.Container
-