Package net.darkhax.botanypots.block
Class BlockEntityBotanyPot
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.darkhax.bookshelf.api.block.entity.InventoryBlockEntity<T>
net.darkhax.bookshelf.api.block.entity.WorldlyInventoryBlockEntity<BotanyPotContainer>
net.darkhax.botanypots.block.BlockEntityBotanyPot
- All Implemented Interfaces:
net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.MenuProvider,net.minecraft.world.Nameable,net.minecraft.world.WorldlyContainer,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeBlockEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
public class BlockEntityBotanyPot
extends net.darkhax.bookshelf.api.block.entity.WorldlyInventoryBlockEntity<BotanyPotContainer>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected booleanprotected intprotected intprotected intstatic final net.darkhax.bookshelf.api.function.CachedSupplier<net.minecraft.world.level.block.entity.BlockEntityType<BlockEntityBotanyPot>>protected intFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZEFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionBlockEntityBotanyPot(net.minecraft.world.level.block.entity.BlockEntityType potType, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGrowth(int nextIntInclusive) booleanbooleannet.minecraft.world.inventory.AbstractContainerMenucreateMenu(int windowId, net.minecraft.world.entity.player.Inventory inventory) intgetCrop()protected net.minecraft.network.chat.ComponentintintgetSoil()net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener>net.minecraft.nbt.CompoundTagbooleanbooleanbooleanisHopper()booleanisValidSeed(net.minecraft.world.item.ItemStack stack) booleanisValidSoil(net.minecraft.world.item.ItemStack stack) voidload(net.minecraft.nbt.CompoundTag tag) voidvoidvoidvoidsaveAdditional(net.minecraft.nbt.CompoundTag tag) static voidtickPot(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, BlockEntityBotanyPot pot) Methods inherited from class net.darkhax.bookshelf.api.block.entity.WorldlyInventoryBlockEntity
canPlaceItemThroughFace, canTakeItemThroughFace, getSlotsForFaceMethods inherited from class net.darkhax.bookshelf.api.block.entity.InventoryBlockEntity
canPlaceItem, clearContent, countItem, dropContents, getContainerSize, getInventory, getItem, getMaxStackSize, hasAnyOf, isEmpty, readInventory, removeItem, removeItemNoUpdate, saveInventory, setChanged, setItem, startOpen, stillValid, stopOpenMethods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canOpen, canUnlock, createMenu, createUnSidedHandler, getCapability, getCustomName, getDisplayName, getName, invalidateCaps, reviveCaps, setCustomNameMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCapsMethods inherited from class java.lang.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, getContainerSize, getItem, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpenMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBTMethods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
Field Details
-
POT_TYPE
public static final net.darkhax.bookshelf.api.function.CachedSupplier<net.minecraft.world.level.block.entity.BlockEntityType<BlockEntityBotanyPot>> POT_TYPE -
growthTime
protected int growthTime -
doneGrowing
protected boolean doneGrowing -
prevComparatorLevel
protected int prevComparatorLevel -
comparatorLevel
protected int comparatorLevel -
harvestDelay
protected int harvestDelay -
exportDelay
protected int exportDelay
-
-
Constructor Details
-
BlockEntityBotanyPot
public BlockEntityBotanyPot(net.minecraft.world.level.block.entity.BlockEntityType potType, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
isHopper
public boolean isHopper() -
refreshRandom
public void refreshRandom() -
getCrop
-
getSoil
-
isGrowing
public boolean isGrowing() -
areGrowthConditionsMet
public boolean areGrowthConditionsMet() -
isCropHarvestable
public boolean isCropHarvestable() -
getLightLevel
public int getLightLevel() -
getGrowthTime
public int getGrowthTime() -
getComparatorLevel
public int getComparatorLevel() -
isValidSoil
public boolean isValidSoil(net.minecraft.world.item.ItemStack stack) -
isValidSeed
public boolean isValidSeed(net.minecraft.world.item.ItemStack stack) -
attemptAutoHarvest
public boolean attemptAutoHarvest() -
tickPot
public static void tickPot(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, BlockEntityBotanyPot pot) -
resetGrowth
public void resetGrowth() -
markDirty
public void markDirty()- Overrides:
markDirtyin classnet.darkhax.bookshelf.api.block.entity.InventoryBlockEntity<BotanyPotContainer>
-
load
public void load(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classnet.darkhax.bookshelf.api.block.entity.InventoryBlockEntity<BotanyPotContainer>
-
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classnet.darkhax.bookshelf.api.block.entity.InventoryBlockEntity<BotanyPotContainer>
-
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag()- Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdatePacket
public net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener> getUpdatePacket()- Overrides:
getUpdatePacketin classnet.minecraft.world.level.block.entity.BlockEntity
-
createInventory
- Specified by:
createInventoryin classnet.darkhax.bookshelf.api.block.entity.InventoryBlockEntity<BotanyPotContainer>
-
getDefaultName
protected net.minecraft.network.chat.Component getDefaultName()- Specified by:
getDefaultNamein classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
createMenu
public net.minecraft.world.inventory.AbstractContainerMenu createMenu(int windowId, net.minecraft.world.entity.player.Inventory inventory) - Overrides:
createMenuin classnet.darkhax.bookshelf.api.block.entity.InventoryBlockEntity<BotanyPotContainer>
-
addGrowth
public void addGrowth(int nextIntInclusive)
-