Package net.minecraft.tileentity
Class BrewingStandTileEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<TileEntity>
-
- net.minecraft.tileentity.TileEntity
-
- net.minecraft.tileentity.LockableTileEntity
-
- net.minecraft.tileentity.BrewingStandTileEntity
-
- All Implemented Interfaces:
IContainerProvider
,INamedContainerProvider
,IClearable
,IInventory
,ISidedInventory
,ITickableTileEntity
,INameable
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeTileEntity
,INBTSerializable<CompoundNBT>
public class BrewingStandTileEntity extends LockableTileEntity implements ISidedInventory, ITickableTileEntity
-
-
Field Summary
Fields Modifier and Type Field Description private int
brewTime
protected IIntArray
dataAccess
private int
fuel
(package private) LazyOptional<? extends IItemHandler>[]
handlers
private Item
ingredient
private NonNullList<ItemStack>
items
private boolean[]
lastPotionCount
private static int[]
SLOTS_FOR_DOWN
private static int[]
SLOTS_FOR_SIDES
private static int[]
SLOTS_FOR_UP
-
Fields inherited from class net.minecraft.tileentity.TileEntity
level, remove, worldPosition
-
Fields inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
INFINITE_EXTENT_AABB
-
-
Constructor Summary
Constructors Constructor Description BrewingStandTileEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canPlaceItem(int p_94041_1_, ItemStack p_94041_2_)
boolean
canPlaceItemThroughFace(int p_180462_1_, ItemStack p_180462_2_, Direction p_180462_3_)
boolean
canTakeItemThroughFace(int p_180461_1_, ItemStack p_180461_2_, Direction p_180461_3_)
void
clearContent()
protected Container
createMenu(int p_213906_1_, PlayerInventory p_213906_2_)
private void
doBrew()
<T> LazyOptional<T>
getCapability(Capability<T> capability, Direction facing)
Retrieves the Optional handler for the capability requested on the specific side.int
getContainerSize()
protected ITextComponent
getDefaultName()
ItemStack
getItem(int p_70301_1_)
boolean[]
getPotionBits()
int[]
getSlotsForFace(Direction p_180463_1_)
protected void
invalidateCaps()
private boolean
isBrewable()
boolean
isEmpty()
void
load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
ItemStack
removeItem(int p_70298_1_, int p_70298_2_)
ItemStack
removeItemNoUpdate(int p_70304_1_)
CompoundNBT
save(CompoundNBT p_189515_1_)
void
setItem(int p_70299_1_, ItemStack p_70299_2_)
boolean
stillValid(PlayerEntity p_70300_1_)
void
tick()
-
Methods inherited from class net.minecraft.tileentity.LockableTileEntity
canOpen, canUnlock, createMenu, createUnSidedHandler, getCustomName, getDisplayName, getName, setCustomName
-
Methods inherited from class net.minecraft.tileentity.TileEntity
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, getUpdateTag, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved, triggerEvent
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCaps
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
deserializeNBT, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
Methods inherited from interface net.minecraft.inventory.IInventory
countItem, getMaxStackSize, hasAnyOf, setChanged, startOpen, stopOpen
-
Methods inherited from interface net.minecraft.util.INameable
hasCustomName
-
-
-
-
Field Detail
-
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
-
items
private NonNullList<ItemStack> items
-
brewTime
private int brewTime
-
lastPotionCount
private boolean[] lastPotionCount
-
ingredient
private Item ingredient
-
fuel
private int fuel
-
dataAccess
protected final IIntArray dataAccess
-
handlers
LazyOptional<? extends IItemHandler>[] handlers
-
-
Method Detail
-
getDefaultName
protected ITextComponent getDefaultName()
- Specified by:
getDefaultName
in classLockableTileEntity
-
getContainerSize
public int getContainerSize()
- Specified by:
getContainerSize
in interfaceIInventory
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceIInventory
-
tick
public void tick()
- Specified by:
tick
in interfaceITickableTileEntity
-
getPotionBits
public boolean[] getPotionBits()
-
isBrewable
private boolean isBrewable()
-
doBrew
private void doBrew()
-
load
public void load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
- Overrides:
load
in classLockableTileEntity
-
save
public CompoundNBT save(CompoundNBT p_189515_1_)
- Overrides:
save
in classLockableTileEntity
-
getItem
public ItemStack getItem(int p_70301_1_)
- Specified by:
getItem
in interfaceIInventory
-
removeItem
public ItemStack removeItem(int p_70298_1_, int p_70298_2_)
- Specified by:
removeItem
in interfaceIInventory
-
removeItemNoUpdate
public ItemStack removeItemNoUpdate(int p_70304_1_)
- Specified by:
removeItemNoUpdate
in interfaceIInventory
-
setItem
public void setItem(int p_70299_1_, ItemStack p_70299_2_)
- Specified by:
setItem
in interfaceIInventory
-
stillValid
public boolean stillValid(PlayerEntity p_70300_1_)
- Specified by:
stillValid
in interfaceIInventory
-
canPlaceItem
public boolean canPlaceItem(int p_94041_1_, ItemStack p_94041_2_)
- Specified by:
canPlaceItem
in interfaceIInventory
-
getSlotsForFace
public int[] getSlotsForFace(Direction p_180463_1_)
- Specified by:
getSlotsForFace
in interfaceISidedInventory
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int p_180462_1_, ItemStack p_180462_2_, @Nullable Direction p_180462_3_)
- Specified by:
canPlaceItemThroughFace
in interfaceISidedInventory
-
canTakeItemThroughFace
public boolean canTakeItemThroughFace(int p_180461_1_, ItemStack p_180461_2_, Direction p_180461_3_)
- Specified by:
canTakeItemThroughFace
in interfaceISidedInventory
-
clearContent
public void clearContent()
- Specified by:
clearContent
in interfaceIClearable
-
createMenu
protected Container createMenu(int p_213906_1_, PlayerInventory p_213906_2_)
- Specified by:
createMenu
in classLockableTileEntity
-
getCapability
public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing)
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 classLockableTileEntity
- Returns:
- The requested an optional holding the requested capability.
-
invalidateCaps
protected void invalidateCaps()
- Overrides:
invalidateCaps
in classLockableTileEntity
-
-