5 #include "../BrewingRecipes.h" 51 virtual
void Destroy() override;
54 virtual
bool Tick(
std::chrono::milliseconds a_Dt,
cChunk & a_Chunk) override;
cItem m_Results[3]
Result items for the bottle inputs.
void SetMiddleBottleSlot(const cItem &a_Item)
Sets the item in the middle bottle slot.
void SetSlot(int a_SlotNum, const cItem &a_Item)
short GetTimeBrewed(void)
Returns the time that the current items has been brewing, in ticks.
cBlockEntityWithItems(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, int a_ItemGridWidth, int a_ItemGridHeight, cWorld *a_World)
virtual bool UsedBy(cPlayer *a_Player) override
Called when a player uses this entity; should open the UI window.
void UpdateProgressBars(bool a_ForceUpdate=false)
Broadcasts progressbar updates, if needed.
void SetTimeBrewed(short a_TimeBrewed)
Sets the current brewing time.
bool m_IsBrewing
Set to true if the brewing stand is brewing an item.
const cItem & GetIndgredientSlot(void) const
Returns the item in the ingredient slot.
short m_TimeBrewed
Amount of ticks that the current item has been brewed.
const cItem & GetMiddleBottleSlot(void) const
Returns the item in the middle bottle slot.
void SetIngredientSlot(const cItem &a_Item)
Sets the item in the ingredient slot.
unsigned char BLOCKTYPE
The datatype used by blockdata.
const cItem & GetSlot(int a_SlotNum) const
void LoadRecipes(void)
Gets the recipes.
short m_RemainingFuel
The remaining fuel for the brewing stand.
const cItem & GetFuelSlot(void) const
Returns the item in the fuel slot.
virtual void Destroy() override
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
virtual void SendTo(cClientHandle &a_Client) override
Sends the packet defining the block entity to the client specified.
const cItem & GetResultItem(int a_SlotNumber)
Get the expected result item for the given slot number.
short GetRemainingFuel(void)
Returns the remaining fuel that is left.
void SetLeftBottleSlot(const cItem &a_Item)
Sets the item in the left bottle slot.
void SetRemainingFuel(short a_RemainingFuel)
Sets the remaining fuel.
bool m_IsDestroyed
Set to true when the brewing stand entity has been destroyed to prevent the block being set again...
void SetRightBottleSlot(const cItem &a_Item)
Sets the item in the right bottle slot.
const cBrewingRecipes::cRecipe * m_CurrentBrewingRecipes[3]
Store the current brewing recipes.
const cItem & GetRightBottleSlot(void) const
Returns the item in the right bottle slot.
virtual void CopyFrom(const cBlockEntity &a_Src) override
Copies all properties of a_Src into this entity, except for its m_World and location.
const cItem & GetLeftBottleSlot(void) const
Returns the item in the left bottle slot.
void ContinueBrewing(void)
Starts the brewing proccess.
virtual void OnSlotChanged(cItemGrid *a_ItemGrid, int a_SlotNum) override
Called whenever a slot changes.
#define BLOCKENTITY_PROTODEF(classname)
Place this macro in the declaration of each cBlockEntity descendant.
short GetBrewingTimeLeft(void) const
Returns the time until the current items finishes brewing, in ticks.
void BroadcastProgress(short a_ProgressbarID, short a_Value)
Sends the specified progressbar value to all clients of the window.
const short m_NeedBrewingTime
Brewing time is 400 ticks.
void SetFuelSlot(const cItem &a_Item)
Sets the item in the fuel slot.
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...