Class ExposedSimpleInventoryBlockEntity
java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
vazkii.botania.common.block.block_entity.BotaniaBlockEntity
vazkii.botania.common.block.block_entity.SimpleInventoryBlockEntity
vazkii.botania.common.block.block_entity.ExposedSimpleInventoryBlockEntity
- All Implemented Interfaces:
net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraft.world.WorldlyContainer
- Direct Known Subclasses:
HoveringHourglassBlockEntity,IncensePlateBlockEntity,ManaPrismBlockEntity,ManaSpreaderBlockEntity,OpenCrateBlockEntity,SparkTinkererBlockEntity,TinyPotatoBlockEntity
public abstract class ExposedSimpleInventoryBlockEntity
extends SimpleInventoryBlockEntity
implements net.minecraft.world.WorldlyContainer
Version of
SimpleInventoryBlockEntity where the backing inventory is exposed to automation-
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
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExposedSimpleInventoryBlockEntity(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 TypeMethodDescriptionbooleancanPlaceItem(int index, net.minecraft.world.item.ItemStack stack) booleancanPlaceItemThroughFace(int index, @NotNull net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.Direction direction) booleancanTakeItemThroughFace(int index, @NotNull net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.Direction direction) intcountItem(net.minecraft.world.item.Item item) intnet.minecraft.world.item.ItemStackgetItem(int index) intint[]getSlotsForFace(net.minecraft.core.Direction side) booleanbooleanisEmpty()net.minecraft.world.item.ItemStackremoveItem(int index, int count) net.minecraft.world.item.ItemStackremoveItemNoUpdate(int index) voidsetItem(int index, net.minecraft.world.item.ItemStack stack) voidstartOpen(net.minecraft.world.entity.player.Player player) booleanstillValid(net.minecraft.world.entity.player.Player player) voidstopOpen(net.minecraft.world.entity.player.Player player) Methods inherited from class vazkii.botania.common.block.block_entity.SimpleInventoryBlockEntity
clearContent, createItemHandler, getItemHandler, inventorySize, readPacketNBT, writePacketNBTMethods inherited from class vazkii.botania.common.block.block_entity.BotaniaBlockEntity
getUpdatePacket, getUpdateTag, loadAdditional, saveAdditionalMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, 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.minecraft.world.Clearable
clearContentMethods inherited from interface net.minecraft.world.Container
canTakeItem, getMaxStackSize, hasAnyMatching, setChanged
-
Constructor Details
-
ExposedSimpleInventoryBlockEntity
protected ExposedSimpleInventoryBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacenet.minecraft.world.Container
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfacenet.minecraft.world.Container
-
getItem
public net.minecraft.world.item.ItemStack getItem(int index) - Specified by:
getItemin interfacenet.minecraft.world.Container
-
removeItem
public net.minecraft.world.item.ItemStack removeItem(int index, int count) - Specified by:
removeItemin interfacenet.minecraft.world.Container
-
removeItemNoUpdate
public net.minecraft.world.item.ItemStack removeItemNoUpdate(int index) - Specified by:
removeItemNoUpdatein interfacenet.minecraft.world.Container
-
setItem
public void setItem(int index, net.minecraft.world.item.ItemStack stack) - Specified by:
setItemin interfacenet.minecraft.world.Container
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Specified by:
stillValidin interfacenet.minecraft.world.Container
-
getMaxStackSize
public int getMaxStackSize()- Specified by:
getMaxStackSizein interfacenet.minecraft.world.Container
-
startOpen
public void startOpen(net.minecraft.world.entity.player.Player player) - Specified by:
startOpenin interfacenet.minecraft.world.Container
-
stopOpen
public void stopOpen(net.minecraft.world.entity.player.Player player) - Specified by:
stopOpenin interfacenet.minecraft.world.Container
-
canPlaceItem
public boolean canPlaceItem(int index, net.minecraft.world.item.ItemStack stack) - Specified by:
canPlaceItemin interfacenet.minecraft.world.Container
-
countItem
public int countItem(net.minecraft.world.item.Item item) - Specified by:
countItemin interfacenet.minecraft.world.Container
-
hasAnyOf
- Specified by:
hasAnyOfin interfacenet.minecraft.world.Container
-
getSlotsForFace
public int[] getSlotsForFace(net.minecraft.core.Direction side) - Specified by:
getSlotsForFacein interfacenet.minecraft.world.WorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int index, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.core.Direction direction) - Specified by:
canPlaceItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
canTakeItemThroughFace
public boolean canTakeItemThroughFace(int index, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.core.Direction direction) - Specified by:
canTakeItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-