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:
Clearable,Container,MenuConstructor,MenuProvider,Nameable,WorldlyContainer,IAttachmentHolder,IMenuProviderExtension,IBlockEntityExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField -
Field Summary
FieldsModifier and TypeFieldDescription(package private) intstatic final intstatic final intprotected final ContainerData(package private) 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 net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlaceItem(int pIndex, ItemStack pStack) Returnstrueif automation is allowed to insert the given stack (ignoring stack size) into the given slot.booleancanPlaceItemThroughFace(int pIndex, ItemStack pItemStack, Direction pDirection) Returnstrueif automation can insert the given item in the given slot from the given side.booleancanTakeItemThroughFace(int pIndex, ItemStack pStack, Direction pDirection) Returnstrueif automation can extract the given item in the given slot from the given side.protected AbstractContainerMenucreateMenu(int pId, Inventory pPlayer) private static voiddoBrew(Level pLevel, BlockPos pPos, NonNullList<ItemStack> pItems) intprotected Componentprotected NonNullList<ItemStack> getItems()private boolean[]int[]getSlotsForFace(Direction pSide) private static booleanisBrewable(PotionBrewing pPotionBrewing, NonNullList<ItemStack> pItems) protected voidloadAdditional(CompoundTag pTag, HolderLookup.Provider pRegistries) protected voidsaveAdditional(CompoundTag pTag, HolderLookup.Provider pRegistries) static voidserverTick(Level pLevel, BlockPos pPos, BlockState pState, BrewingStandBlockEntity pBlockEntity) protected voidsetItems(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, stillValidMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods 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, countItem, getItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpenMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdateMethods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen, writeClientSideDataMethods 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:
-
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:
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 pLevel, BlockPos pPos, BlockState pState, BrewingStandBlockEntity pBlockEntity) -
getPotionBits
private boolean[] getPotionBits() -
isBrewable
-
doBrew
-
loadAdditional
- Overrides:
loadAdditionalin classBaseContainerBlockEntity
-
saveAdditional
- Overrides:
saveAdditionalin classBaseContainerBlockEntity
-
canPlaceItem
Returnstrueif 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 pIndex, ItemStack pItemStack, @Nullable Direction pDirection) Returnstrueif automation can insert the given item in the given slot from the given side.- Specified by:
canPlaceItemThroughFacein interfaceWorldlyContainer
-
canTakeItemThroughFace
Returnstrueif automation can extract the given item in the given slot from the given side.- Specified by:
canTakeItemThroughFacein interfaceWorldlyContainer
-
createMenu
- Specified by:
createMenuin classBaseContainerBlockEntity
-