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,ICapabilitySerializable<CompoundTag>,IForgeBlockEntity,INBTSerializable<CompoundTag>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) intstatic intstatic intprotected ContainerData(package private) intprivate static intstatic int(package private) LazyOptional<? extends IItemHandler>[]private Itemprivate static intprivate NonNullList<ItemStack>private boolean[]static intprivate static int[]private static int[]private static int[]Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraft.world.Container
LARGE_MAX_STACK_SIZEFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlaceItem(int p_59017_, ItemStack p_59018_)booleancanPlaceItemThroughFace(int p_58996_, ItemStack p_58997_, Direction p_58998_)booleancanTakeItemThroughFace(int p_59020_, ItemStack p_59021_, Direction p_59022_)voidprotected AbstractContainerMenucreateMenu(int p_58990_, Inventory p_58991_)private static voiddoBrew(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.intprotected ComponentgetItem(int p_58985_)private boolean[]int[]getSlotsForFace(Direction p_59010_)voidprivate static booleanisBrewable(NonNullList<ItemStack> p_155295_)booleanisEmpty()voidload(CompoundTag p_155297_)removeItem(int p_58987_, int p_58988_)removeItemNoUpdate(int p_59015_)voidsave(CompoundTag p_59012_)static voidserverTick(Level p_155286_, BlockPos p_155287_, BlockState p_155288_, BrewingStandBlockEntity p_155289_)voidbooleanstillValid(Player p_59000_)Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canOpen, canUnlock, createMenu, createUnSidedHandler, getCustomName, getDisplayName, getName, setCustomNameMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
countItem, getMaxStackSize, hasAnyOf, setChanged, startOpen, stopOpenMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBTMethods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
Field Details
-
INGREDIENT_SLOT
private static final int INGREDIENT_SLOT- See Also:
- Constant Field Values
-
FUEL_SLOT
private static final int FUEL_SLOT- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
DATA_BREW_TIME
public static final int DATA_BREW_TIME- See Also:
- Constant Field Values
-
DATA_FUEL_USES
public static final int DATA_FUEL_USES- See Also:
- Constant Field Values
-
NUM_DATA_VALUES
public static final int NUM_DATA_VALUES- See Also:
- Constant Field Values
-
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:
getDefaultNamein classBaseContainerBlockEntity
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfaceContainer
-
isEmpty
public boolean isEmpty() -
serverTick
public static void serverTick(Level p_155286_, BlockPos p_155287_, BlockState p_155288_, BrewingStandBlockEntity p_155289_) -
getPotionBits
private boolean[] getPotionBits() -
isBrewable
-
doBrew
-
load
- Overrides:
loadin classBaseContainerBlockEntity
-
save
- Overrides:
savein classBaseContainerBlockEntity
-
getItem
-
removeItem
- Specified by:
removeItemin interfaceContainer
-
removeItemNoUpdate
- Specified by:
removeItemNoUpdatein interfaceContainer
-
setItem
-
stillValid
- Specified by:
stillValidin interfaceContainer
-
canPlaceItem
- Specified by:
canPlaceItemin interfaceContainer
-
getSlotsForFace
- Specified by:
getSlotsForFacein interfaceWorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int p_58996_, ItemStack p_58997_, @Nullable Direction p_58998_)- Specified by:
canPlaceItemThroughFacein interfaceWorldlyContainer
-
canTakeItemThroughFace
- Specified by:
canTakeItemThroughFacein interfaceWorldlyContainer
-
clearContent
public void clearContent()- Specified by:
clearContentin interfaceClearable
-
createMenu
- Specified by:
createMenuin classBaseContainerBlockEntity
-
getCapability
Description copied from interface:ICapabilityProviderRetrieves 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:
getCapabilityin interfaceICapabilityProvider- Overrides:
getCapabilityin 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()- Overrides:
invalidateCapsin classBaseContainerBlockEntity
-
reviveCaps
public void reviveCaps()- Overrides:
reviveCapsin classBaseContainerBlockEntity
-