summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-09-23 18:47:46 +0200
committerAlexander Harkness <me@bearbin.net>2017-09-23 18:47:46 +0200
commit463fa48aec7a9f1c7101245c43c6895bf3734465 (patch)
treef03da5a66ed1c1ec070c1adbabb8ad5d18447fe6
parentAdd support for release 1.12.2 (#4041) (diff)
downloadcuberite-463fa48aec7a9f1c7101245c43c6895bf3734465.tar
cuberite-463fa48aec7a9f1c7101245c43c6895bf3734465.tar.gz
cuberite-463fa48aec7a9f1c7101245c43c6895bf3734465.tar.bz2
cuberite-463fa48aec7a9f1c7101245c43c6895bf3734465.tar.lz
cuberite-463fa48aec7a9f1c7101245c43c6895bf3734465.tar.xz
cuberite-463fa48aec7a9f1c7101245c43c6895bf3734465.tar.zst
cuberite-463fa48aec7a9f1c7101245c43c6895bf3734465.zip
-rw-r--r--src/BlockArea.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp
index b32851afc..5e66e4aec 100644
--- a/src/BlockArea.cpp
+++ b/src/BlockArea.cpp
@@ -835,7 +835,14 @@ 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 (HasBlockEntities() && ((a_DataTypes & baTypes) != 0))
{
- RescanBlockEntities();
+ if (cBlockEntity::IsBlockEntityBlockType(a_BlockType))
+ {
+ RescanBlockEntities();
+ }
+ else
+ {
+ ClearBlockEntities(*m_BlockEntities);
+ }
}
}
@@ -888,7 +895,14 @@ 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 (HasBlockEntities() && ((a_DataTypes & baTypes) != 0))
{
- RescanBlockEntities();
+ if (cBlockEntity::IsBlockEntityBlockType(a_BlockType))
+ {
+ RescanBlockEntities();
+ }
+ else
+ {
+ ClearBlockEntities(*m_BlockEntities);
+ }
}
}