diff options
author | Mattes D <github@xoft.cz> | 2019-09-29 14:59:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-29 14:59:24 +0200 |
commit | 365cbc6e1cea96741e26c9ce912b003f8fd2c62c (patch) | |
tree | f23682c47928597791c53f3a300b03494ffde417 /src/BlockEntities/FurnaceEntity.cpp | |
parent | Cactus can now grow and will be dropped if there is no place to grow. (diff) | |
download | cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.gz cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.bz2 cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.lz cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.xz cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.zst cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.zip |
Diffstat (limited to 'src/BlockEntities/FurnaceEntity.cpp')
-rw-r--r-- | src/BlockEntities/FurnaceEntity.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/BlockEntities/FurnaceEntity.cpp b/src/BlockEntities/FurnaceEntity.cpp index ea58cc4fd..38fcf77a4 100644 --- a/src/BlockEntities/FurnaceEntity.cpp +++ b/src/BlockEntities/FurnaceEntity.cpp @@ -22,8 +22,8 @@ enum -cFurnaceEntity::cFurnaceEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World): - Super(a_BlockType, a_BlockMeta, a_BlockX, a_BlockY, a_BlockZ, ContentsWidth, ContentsHeight, a_World), +cFurnaceEntity::cFurnaceEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World): + super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World), m_CurrentRecipe(nullptr), m_IsDestroyed(false), m_IsCooking(a_BlockType == E_BLOCK_LIT_FURNACE), @@ -58,7 +58,7 @@ cFurnaceEntity::~cFurnaceEntity() void cFurnaceEntity::Destroy() { m_IsDestroyed = true; - Super::Destroy(); + super::Destroy(); } @@ -67,7 +67,7 @@ void cFurnaceEntity::Destroy() void cFurnaceEntity::CopyFrom(const cBlockEntity & a_Src) { - Super::CopyFrom(a_Src); + super::CopyFrom(a_Src); auto & src = static_cast<const cFurnaceEntity &>(a_Src); m_Contents.CopyFrom(src.m_Contents); m_CurrentRecipe = src.m_CurrentRecipe; @@ -106,7 +106,7 @@ bool cFurnaceEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) // Reset progressbars, block type, and bail out m_BlockType = E_BLOCK_FURNACE; - a_Chunk.FastSetBlock(GetRelX(), m_PosY, GetRelZ(), E_BLOCK_FURNACE, m_BlockMeta); + a_Chunk.FastSetBlock(GetRelPos(), E_BLOCK_FURNACE, m_BlockMeta); UpdateProgressBars(); return false; } @@ -142,7 +142,7 @@ bool cFurnaceEntity::UsedBy(cPlayer * a_Player) cWindow * Window = GetWindow(); if (Window == nullptr) { - OpenWindow(new cFurnaceWindow(m_PosX, m_PosY, m_PosZ, this)); + OpenWindow(new cFurnaceWindow(this)); Window = GetWindow(); } @@ -255,7 +255,7 @@ void cFurnaceEntity::BurnNewFuel(void) void cFurnaceEntity::OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) { - Super::OnSlotChanged(a_ItemGrid, a_SlotNum); + super::OnSlotChanged(a_ItemGrid, a_SlotNum); if (m_IsDestroyed) { @@ -433,6 +433,6 @@ void cFurnaceEntity::SetIsCooking(bool a_IsCooking) if (m_IsCooking) { m_BlockType = E_BLOCK_LIT_FURNACE; - m_World->FastSetBlock(m_PosX, m_PosY, m_PosZ, E_BLOCK_LIT_FURNACE, m_BlockMeta); + m_World->FastSetBlock(m_Pos, E_BLOCK_LIT_FURNACE, m_BlockMeta); } } |