55 virtual
bool Tick(
std::chrono::milliseconds a_Dt,
cChunk & a_Chunk) override;
bool MoveItemsFromChest(cChunk &a_Chunk)
Moves items from a chest (dblchest) above the hopper into this hopper.
cBlockEntityWithItems(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, int a_ItemGridWidth, int a_ItemGridHeight, cWorld *a_World)
Int64 m_LastMoveItemsInTick
std::pair< bool, Vector3i > GetOutputBlockPos(NIBBLETYPE a_BlockMeta)
Returns the block coords of the block receiving the output items, based on the meta Returns <false...
unsigned char BLOCKTYPE
The datatype used by blockdata.
bool MoveItemsFromSlot(cBlockEntityWithItems &a_Entity, int a_SrcSlotNum)
Moves one piece from the specified itemstack into this hopper.
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
bool MoveItemsToSlot(cBlockEntityWithItems &a_Entity, int a_DstSlotNum)
Moves one piece to the specified entity's contents' slot.
bool MoveItemsToChest(cChunk &a_Chunk, Vector3i a_Coords)
Moves items to the chest at the specified absolute coords.
bool MoveItemsToGrid(cBlockEntityWithItems &a_Entity)
Moves items to the specified ItemGrid.
bool MoveItemsToFurnace(cChunk &a_Chunk, Vector3i a_Coords, NIBBLETYPE a_HopperMeta)
Moves items to the furnace at the specified absolute coords.
Int64 m_LastMoveItemsOutTick
bool MovePickupsIn(cChunk &a_Chunk, Int64 a_CurrentTick)
Moves pickups from above this hopper into it.
bool MoveItemsFromFurnace(cChunk &a_Chunk)
Moves items from a furnace above the hopper into this hopper.
virtual bool Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
Ticks the entity; returns true if the chunk should be marked as dirty as a result of this ticking...
bool MoveItemsFromGrid(cBlockEntityWithItems &a_Entity)
Moves items from the specified a_Entity's Contents into this hopper.
How many ticks at minimum between two item transfers to or from the hopper.
#define BLOCKENTITY_PROTODEF(classname)
Place this macro in the declaration of each cBlockEntity descendant.
bool MoveItemsIn(cChunk &a_Chunk, Int64 a_CurrentTick)
Moves items from the container above it into this hopper.
virtual void CopyFrom(const cBlockEntity &a_Src) override
Copies all properties of a_Src into this entity, except for its m_World and location.
virtual bool UsedBy(cPlayer *a_Player) override
Called when a player uses this entity; should open the UI window.
bool MoveItemsOut(cChunk &a_Chunk, Int64 a_CurrentTick)
Moves items out from this hopper into the destination.
void OpenNewWindow(void)
Opens a new chest window for this chest.
virtual void SendTo(cClientHandle &a_Client) override
Sends the packet defining the block entity to the client specified.