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>
,Clearable
,Container
,MenuConstructor
,MenuProvider
,Nameable
,WorldlyContainer
,IAttachmentHolder
,IBlockEntityExtension
,IMenuProviderExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.BlockEntityPathElement
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
Nested classes/interfaces inherited from interface net.minecraft.world.Container
Container.ContainerIterator
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
static final int
static final int
protected final ContainerData
private static final short
private static final byte
(package private) int
private static final int
static final int
private Item
private static final int
private NonNullList
<ItemStack> The items currently placed in the slots of the brewing stand.private boolean[]
static final int
private static final int[]
private static final int[]
private static final int[]
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canPlaceItem
(int pIndex, ItemStack pStack) Returnstrue
if automation is allowed to insert the given stack (ignoring stack size) into the given slot.boolean
canPlaceItemThroughFace
(int pIndex, ItemStack pItemStack, Direction pDirection) Returnstrue
if automation can insert the given item in the given slot from the given side.boolean
canTakeItemThroughFace
(int pIndex, ItemStack pStack, Direction pDirection) Returnstrue
if automation can extract the given item in the given slot from the given side.protected AbstractContainerMenu
createMenu
(int pId, Inventory pPlayer) private static void
doBrew
(Level pLevel, BlockPos pPos, NonNullList<ItemStack> pItems) int
protected Component
protected NonNullList
<ItemStack> getItems()
private boolean[]
int[]
getSlotsForFace
(Direction pSide) private static boolean
isBrewable
(PotionBrewing pPotionBrewing, NonNullList<ItemStack> pItems) protected void
loadAdditional
(ValueInput pInput) protected void
saveAdditional
(ValueOutput pOutput) static void
serverTick
(Level pLevel, BlockPos pPos, BlockState pState, BrewingStandBlockEntity pBlockEntity) protected void
setItems
(NonNullList<ItemStack> pItems) Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
applyImplicitComponents, canOpen, canUnlock, clearContent, collectImplicitComponents, createMenu, getCustomName, getDisplayName, getItem, getName, isEmpty, removeComponentsFromTag, removeItem, removeItemNoUpdate, setItem, stillValid
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, preRemoveSideEffects, problemPath, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.Clearable
clearContent
Methods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, getItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, iterator, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpen
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
Methods inherited from interface net.neoforged.neoforge.common.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen, writeClientSideData
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
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:
-
items
The items currently placed in the slots of the brewing stand. -
brewTime
int brewTime -
lastPotionCount
private boolean[] lastPotionCount -
ingredient
-
fuel
int fuel -
dataAccess
-
-
Constructor Details
-
BrewingStandBlockEntity
-
-
Method Details
-
getDefaultName
- Specified by:
getDefaultName
in classBaseContainerBlockEntity
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSize
in interfaceContainer
-
getItems
- Specified by:
getItems
in classBaseContainerBlockEntity
-
setItems
- Specified by:
setItems
in classBaseContainerBlockEntity
-
serverTick
public static void serverTick(Level pLevel, BlockPos pPos, BlockState pState, BrewingStandBlockEntity pBlockEntity) -
getPotionBits
private boolean[] getPotionBits() -
isBrewable
-
doBrew
-
loadAdditional
- Overrides:
loadAdditional
in classBaseContainerBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBaseContainerBlockEntity
-
canPlaceItem
Returnstrue
if automation is allowed to insert the given stack (ignoring stack size) into the given slot. For guis use Slot.isItemValid- Specified by:
canPlaceItem
in interfaceContainer
-
getSlotsForFace
- Specified by:
getSlotsForFace
in interfaceWorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int pIndex, ItemStack pItemStack, @Nullable Direction pDirection) Returnstrue
if automation can insert the given item in the given slot from the given side.- Specified by:
canPlaceItemThroughFace
in interfaceWorldlyContainer
-
canTakeItemThroughFace
Returnstrue
if automation can extract the given item in the given slot from the given side.- Specified by:
canTakeItemThroughFace
in interfaceWorldlyContainer
-
createMenu
- Specified by:
createMenu
in classBaseContainerBlockEntity
-