Class BrewingStandBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.BrewingStandBlockEntity
- All Implemented Interfaces:
Iterable<ItemStack>, TypedInstance<BlockEntityType<?>>, DebugValueSource, Clearable, Container, SlotProvider, MenuConstructor, MenuProvider, Nameable, WorldlyContainer, IAttachmentHolder, ContainerExtension, IBlockEntityExtension, IMenuProviderExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class AttachmentHolder
AttachmentHolder.AsFieldNested classes/interfaces inherited from interface Container
Container.ContainerIteratorNested classes/interfaces inherited from interface DebugValueSource
DebugValueSource.Registration, DebugValueSource.ValueGetter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intstatic final intstatic final intprotected final ContainerDataprivate static final shortprivate static final byteprivate static final Componentprivate intprivate static final intstatic final intprivate Itemprivate static final intprivate NonNullList<ItemStack> The items currently placed in the slots of the brewing stand.private boolean[]static final intprivate static final int[]private static final int[]private static final int[]Fields inherited from class BlockEntity
level, remove, worldPositionFields inherited from class AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlaceItem(int slot, ItemStack itemStack) Returnstrueif automation is allowed to insert the given stack (ignoring stack size) into the given slot.booleancanPlaceItemThroughFace(int slot, ItemStack itemStack, @Nullable Direction direction) Returnstrueif automation can insert the given item in the given slot from the given side.booleancanTakeItemThroughFace(int slot, ItemStack itemStack, Direction direction) Returnstrueif automation can extract the given item in the given slot from the given side.protected AbstractContainerMenucreateMenu(int containerId, Inventory inventory) private static voiddoBrew(Level level, BlockPos pos, NonNullList<ItemStack> items) intprotected Componentprotected NonNullList<ItemStack> getItems()private boolean[]int[]getSlotsForFace(Direction direction) private static booleanisBrewable(PotionBrewing potionBrewing, NonNullList<ItemStack> items) protected voidloadAdditional(ValueInput input) protected voidsaveAdditional(ValueOutput output) static voidserverTick(Level level, BlockPos pos, BlockState selfState, BrewingStandBlockEntity entity) protected voidsetItems(NonNullList<ItemStack> items) Methods inherited from class BaseContainerBlockEntity
applyImplicitComponents, canOpen, clearContent, collectImplicitComponents, createMenu, getCustomName, getDisplayName, getItem, getName, isEmpty, isLocked, removeComponentsFromTag, removeItem, removeItemNoUpdate, sendChestLockedNotifications, setItem, setItem, stillValidMethods inherited from class BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getAndClearAttachmentTypesToSync, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, preRemoveSideEffects, problemPath, registerDebugValues, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, triggerEvent, typeHolderMethods inherited from class AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Clearable
clearContentMethods inherited from interface Container
canTakeItem, countItem, getEntitiesWithContainerOpen, getItem, getMaxStackSize, getMaxStackSize, getSlot, hasAnyMatching, hasAnyOf, isEmpty, iterator, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpenMethods inherited from interface ContainerExtension
onTransfer, setItemMethods inherited from interface IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdateMethods inherited from interface IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen, writeClientSideDataMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface Nameable
getPlainTextName, hasCustomNameMethods inherited from interface SlotProvider
getSlotsFromRange
-
Field Details
-
INGREDIENT_SLOT
private static final int INGREDIENT_SLOT- See Also:
-
FUEL_SLOT
private static final int FUEL_SLOT- See Also:
-
SLOTS_FOR_UP
private static final int[] SLOTS_FOR_UP -
SLOTS_FOR_DOWN
private static final int[] SLOTS_FOR_DOWN -
SLOTS_FOR_SIDES
private static final int[] SLOTS_FOR_SIDES -
FUEL_USES
public static final int FUEL_USES- See Also:
-
DATA_BREW_TIME
public static final int DATA_BREW_TIME- See Also:
-
DATA_FUEL_USES
public static final int DATA_FUEL_USES- See Also:
-
NUM_DATA_VALUES
public static final int NUM_DATA_VALUES- See Also:
-
DEFAULT_BREW_TIME
private static final short DEFAULT_BREW_TIME- See Also:
-
DEFAULT_FUEL
private static final byte DEFAULT_FUEL- See Also:
-
DEFAULT_NAME
-
items
The items currently placed in the slots of the brewing stand. -
brewTime
private int brewTime -
lastPotionCount
private boolean[] lastPotionCount -
ingredient
-
fuel
private int fuel -
dataAccess
-
-
Constructor Details
-
BrewingStandBlockEntity
-
-
Method Details
-
getDefaultName
- Specified by:
getDefaultNamein classBaseContainerBlockEntity
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfaceContainer
-
getItems
- Specified by:
getItemsin classBaseContainerBlockEntity
-
setItems
- Specified by:
setItemsin classBaseContainerBlockEntity
-
serverTick
public static void serverTick(Level level, BlockPos pos, BlockState selfState, BrewingStandBlockEntity entity) -
getPotionBits
private boolean[] getPotionBits() -
isBrewable
-
doBrew
-
loadAdditional
- Overrides:
loadAdditionalin classBaseContainerBlockEntity
-
saveAdditional
- Overrides:
saveAdditionalin classBaseContainerBlockEntity
-
canPlaceItem
Description copied from interface:ContainerReturnstrueif automation is allowed to insert the given stack (ignoring stack size) into the given slot. For guis use Slot.isItemValid- Specified by:
canPlaceItemin interfaceContainer
-
getSlotsForFace
- Specified by:
getSlotsForFacein interfaceWorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int slot, ItemStack itemStack, @Nullable Direction direction) Description copied from interface:WorldlyContainerReturnstrueif automation can insert the given item in the given slot from the given side.- Specified by:
canPlaceItemThroughFacein interfaceWorldlyContainer
-
canTakeItemThroughFace
Description copied from interface:WorldlyContainerReturnstrueif automation can extract the given item in the given slot from the given side.- Specified by:
canTakeItemThroughFacein interfaceWorldlyContainer
-
createMenu
- Specified by:
createMenuin classBaseContainerBlockEntity
-