Class BotanyPotBlockEntity
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
net.darkhax.botanypots.common.impl.block.entity.BotanyPotBlockEntity
- 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
-
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 TypeFieldDescriptionintprotected net.darkhax.bookshelf.common.api.util.TickAccumulatorprotected net.darkhax.bookshelf.common.api.util.TickAccumulatornet.darkhax.bookshelf.common.api.util.TickAccumulatorstatic final net.darkhax.bookshelf.common.api.function.CachedSupplier<net.minecraft.world.level.block.entity.BlockEntityType<BotanyPotBlockEntity>> Fields inherited from class net.darkhax.botanypots.common.impl.block.entity.AbstractBotanyPotBlockEntity
below, DEFAULT_NAME, EMPTY_SLOTS, potType, SEED_SLOT, SLOT_COUNT, SOIL_SLOT, STORAGE_SLOTS, TOOL_SLOTFields 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
ConstructorsConstructorDescriptionBotanyPotBlockEntity(Supplier<net.minecraft.world.level.block.entity.BlockEntityType<BotanyPotBlockEntity>> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) BotanyPotBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanprotected @NotNull net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int containerId, @NotNull net.minecraft.world.entity.player.Inventory playerInv) <T extends BotanyPotRecipe>
TgetOrInvalidate(net.minecraft.world.item.ItemStack stack, net.darkhax.bookshelf.common.api.function.ReloadableCache<net.minecraft.world.item.crafting.RecipeHolder<T>> cache) intnet.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket@NotNull net.minecraft.nbt.CompoundTaggetUpdateTag(net.minecraft.core.HolderLookup.Provider registries) floatvoidloadAdditional(@NotNull net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) voidonSeedChanged(net.minecraft.world.item.ItemStack newStack) voidonSoilChanged(net.minecraft.world.item.ItemStack newStack) voidonToolChanged(net.minecraft.world.item.ItemStack newStack) voidreset()voidsaveAdditional(@NotNull net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) voidsetBonemealCooldown(int cooldown) static voidtickPot(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, BotanyPotBlockEntity pot) voidupdateComparatorLevel(int newLevel) voidupdateGrowthTime(float newTime) Methods inherited from class net.darkhax.botanypots.common.impl.block.entity.AbstractBotanyPotBlockEntity
canPlaceItemThroughFace, canTakeItemThroughFace, createCommandSourceStack, getContainerSize, getDefaultName, getHarvestItem, getItems, getPotType, getSeedItem, getSlotsForFace, getSoilItem, isHopper, markUpdated, runFunction, setHoe, setItem, setItems, setSeed, setSoilItemMethods 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, 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, 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
-
TYPE
public static final net.darkhax.bookshelf.common.api.function.CachedSupplier<net.minecraft.world.level.block.entity.BlockEntityType<BotanyPotBlockEntity>> TYPE -
growthTime
public net.darkhax.bookshelf.common.api.util.TickAccumulator growthTime -
comparatorLevel
public int comparatorLevel -
exportCooldown
protected net.darkhax.bookshelf.common.api.util.TickAccumulator exportCooldown -
growCooldown
protected net.darkhax.bookshelf.common.api.util.TickAccumulator growCooldown
-
-
Constructor Details
-
BotanyPotBlockEntity
public BotanyPotBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
BotanyPotBlockEntity
public BotanyPotBlockEntity(Supplier<net.minecraft.world.level.block.entity.BlockEntityType<BotanyPotBlockEntity>> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
tickPot
public static void tickPot(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, BotanyPotBlockEntity pot) -
canHarvest
public boolean canHarvest() -
reset
public void reset() -
updateGrowthTime
public void updateGrowthTime(float newTime) -
updateComparatorLevel
public void updateComparatorLevel(int newLevel) -
growthTime
public float growthTime() -
getRecipeContext
-
canBonemeal
public boolean canBonemeal() -
setBonemealCooldown
public void setBonemealCooldown(int cooldown) -
onSoilChanged
public void onSoilChanged(net.minecraft.world.item.ItemStack newStack) - Specified by:
onSoilChangedin classAbstractBotanyPotBlockEntity
-
onSeedChanged
public void onSeedChanged(net.minecraft.world.item.ItemStack newStack) - Specified by:
onSeedChangedin classAbstractBotanyPotBlockEntity
-
onToolChanged
public void onToolChanged(net.minecraft.world.item.ItemStack newStack) - Specified by:
onToolChangedin classAbstractBotanyPotBlockEntity
-
getOrInvalidateSoil
-
getOrInvalidateCrop
-
getOrInvalidate
@Nullable public <T extends BotanyPotRecipe> T getOrInvalidate(net.minecraft.world.item.ItemStack stack, net.darkhax.bookshelf.common.api.function.ReloadableCache<net.minecraft.world.item.crafting.RecipeHolder<T>> cache) -
loadAdditional
public void loadAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag, @NotNull net.minecraft.core.HolderLookup.Provider registries) - Overrides:
loadAdditionalin classAbstractBotanyPotBlockEntity
-
saveAdditional
public void saveAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag, @NotNull net.minecraft.core.HolderLookup.Provider registries) - Overrides:
saveAdditionalin classAbstractBotanyPotBlockEntity
-
getUpdateTag
@NotNull public @NotNull net.minecraft.nbt.CompoundTag getUpdateTag(@NotNull net.minecraft.core.HolderLookup.Provider registries) - Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdatePacket
public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()- Overrides:
getUpdatePacketin classnet.minecraft.world.level.block.entity.BlockEntity
-
createMenu
@NotNull protected @NotNull net.minecraft.world.inventory.AbstractContainerMenu createMenu(int containerId, @NotNull @NotNull net.minecraft.world.entity.player.Inventory playerInv) - Specified by:
createMenuin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getRequiredGrowthTicks
public int getRequiredGrowthTicks()
-