Class BrewingStandBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
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
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,IForgeBlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
Field Summary
Modifier and TypeFieldDescription(package private) int
static final int
static final int
protected final ContainerData
(package private) int
private static final int
static final int
(package private) LazyOptional<? extends IItemHandler>[]
private Item
private static final int
private NonNullList
<ItemStack> 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 interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canPlaceItem
(int p_59017_, ItemStack p_59018_) boolean
canPlaceItemThroughFace
(int p_58996_, ItemStack p_58997_, Direction p_58998_) boolean
canTakeItemThroughFace
(int p_59020_, ItemStack p_59021_, Direction p_59022_) protected AbstractContainerMenu
createMenu
(int p_58990_, Inventory p_58991_) private static void
doBrew
(Level p_155291_, BlockPos p_155292_, NonNullList<ItemStack> p_155293_) <T> LazyOptional
<T> getCapability
(Capability<T> capability, Direction facing) Retrieves the Optional handler for the capability requested on the specific side.int
protected Component
protected NonNullList
<ItemStack> getItems()
private boolean[]
int[]
getSlotsForFace
(Direction p_59010_) void
private static boolean
isBrewable
(PotionBrewing p_336227_, NonNullList<ItemStack> p_155295_) protected void
loadAdditional
(CompoundTag p_335279_, HolderLookup.Provider p_330361_) void
protected void
saveAdditional
(CompoundTag p_187484_, HolderLookup.Provider p_336147_) static void
serverTick
(Level p_155286_, BlockPos p_155287_, BlockState p_155288_, BrewingStandBlockEntity p_155289_) protected void
setItems
(NonNullList<ItemStack> p_332629_) Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
applyImplicitComponents, canOpen, canUnlock, clearContent, collectImplicitComponents, createMenu, createUnSidedHandler, 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, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadCustomOnly, loadStatic, loadWithComponents, onChunkUnloaded, onlyOpCanSetNbt, parseCustomNameSafe, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setLevel, setRemoved, triggerEvent
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCaps
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, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpen
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate
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:
-
items
-
brewTime
int brewTime -
lastPotionCount
private boolean[] lastPotionCount -
ingredient
-
fuel
int fuel -
dataAccess
-
handlers
LazyOptional<? extends IItemHandler>[] handlers
-
-
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 p_155286_, BlockPos p_155287_, BlockState p_155288_, BrewingStandBlockEntity p_155289_) -
getPotionBits
private boolean[] getPotionBits() -
isBrewable
-
doBrew
-
loadAdditional
- Overrides:
loadAdditional
in classBaseContainerBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBaseContainerBlockEntity
-
canPlaceItem
- Specified by:
canPlaceItem
in interfaceContainer
-
getSlotsForFace
- Specified by:
getSlotsForFace
in interfaceWorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int p_58996_, ItemStack p_58997_, @Nullable Direction p_58998_) - Specified by:
canPlaceItemThroughFace
in interfaceWorldlyContainer
-
canTakeItemThroughFace
- Specified by:
canTakeItemThroughFace
in interfaceWorldlyContainer
-
createMenu
- Specified by:
createMenu
in classBaseContainerBlockEntity
-
getCapability
Description copied from interface:ICapabilityProvider
Retrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.- Specified by:
getCapability
in interfaceICapabilityProvider
- Overrides:
getCapability
in classBaseContainerBlockEntity
- Parameters:
capability
- The capability to checkfacing
- The Side to check from, CAN BE NULL. Null is defined to represent 'internal' or 'self'- Returns:
- The requested an optional holding the requested capability.
-
invalidateCaps
public void invalidateCaps()- Specified by:
invalidateCaps
in interfaceICapabilityProviderImpl<BlockEntity>
- Overrides:
invalidateCaps
in classBaseContainerBlockEntity
-
reviveCaps
public void reviveCaps()- Specified by:
reviveCaps
in interfaceICapabilityProviderImpl<BlockEntity>
- Overrides:
reviveCaps
in classBaseContainerBlockEntity
-