cBlockArea: Fix performance regression (#4045)
This commit is contained in:
parent
e883aa828c
commit
463fa48aec
|
@ -834,9 +834,16 @@ void cBlockArea::Fill(int a_DataTypes, BLOCKTYPE a_BlockType, NIBBLETYPE a_Block
|
||||||
|
|
||||||
// If the area contains block entities, remove those not matching and replace with whatever block entity block was filled
|
// If the area contains block entities, remove those not matching and replace with whatever block entity block was filled
|
||||||
if (HasBlockEntities() && ((a_DataTypes & baTypes) != 0))
|
if (HasBlockEntities() && ((a_DataTypes & baTypes) != 0))
|
||||||
|
{
|
||||||
|
if (cBlockEntity::IsBlockEntityBlockType(a_BlockType))
|
||||||
{
|
{
|
||||||
RescanBlockEntities();
|
RescanBlockEntities();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ClearBlockEntities(*m_BlockEntities);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -887,9 +894,16 @@ void cBlockArea::FillRelCuboid(int a_MinRelX, int a_MaxRelX, int a_MinRelY, int
|
||||||
|
|
||||||
// If the area contains block entities, remove those in the affected cuboid and replace with whatever block entity block was filled:
|
// If the area contains block entities, remove those in the affected cuboid and replace with whatever block entity block was filled:
|
||||||
if (HasBlockEntities() && ((a_DataTypes & baTypes) != 0))
|
if (HasBlockEntities() && ((a_DataTypes & baTypes) != 0))
|
||||||
|
{
|
||||||
|
if (cBlockEntity::IsBlockEntityBlockType(a_BlockType))
|
||||||
{
|
{
|
||||||
RescanBlockEntities();
|
RescanBlockEntities();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ClearBlockEntities(*m_BlockEntities);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user