1
0

Fixed some new 1.7 client crash bugs

Some technical blocks were removed; trying to render them as items
caused a crash.
This commit is contained in:
Tiger Wang
2013-12-07 18:03:56 +00:00
parent a61082ffee
commit 5bed85aba0
6 changed files with 41 additions and 1 deletions

View File

@@ -113,7 +113,7 @@ void cPiston::ExtendPiston(int pistx, int pisty, int pistz)
AddDir(pistx, pisty, pistz, pistonMeta, -1);
// "pist" now at piston body, "ext" at future extension
m_World->SetBlock( pistx, pisty, pistz, pistonBlock, pistonMeta | 0x8);
m_World->SetBlock(pistx, pisty, pistz, pistonBlock, pistonMeta | 0x8);
m_World->QueueSetBlock(extx, exty, extz, E_BLOCK_PISTON_EXTENSION, pistonMeta | (IsSticky(pistonBlock) ? 8 : 0), PISTON_TICK_DELAY);
}
@@ -126,6 +126,7 @@ void cPiston::RetractPiston(int pistx, int pisty, int pistz)
BLOCKTYPE pistonBlock;
NIBBLETYPE pistonMeta;
m_World->GetBlockTypeMeta(pistx, pisty, pistz, pistonBlock, pistonMeta);
if (!IsExtended(pistonMeta))
{
// Already retracted, bail out