summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/WSSAnvil.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-09 10:50:38 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-09 10:50:38 +0200
commit372dbbb994a1414369fe38367d458a0c32866a79 (patch)
tree5cd564fbb0c4b7c0b47f3cb64594c34f9361f1dc /src/WorldStorage/WSSAnvil.cpp
parentUpdated generator prefabs to current Gallery contents. (diff)
parentAdded extra space before comments (diff)
downloadcuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar
cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.gz
cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.bz2
cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.lz
cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.xz
cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.zst
cuberite-372dbbb994a1414369fe38367d458a0c32866a79.zip
Diffstat (limited to 'src/WorldStorage/WSSAnvil.cpp')
-rw-r--r--src/WorldStorage/WSSAnvil.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 9870c144a..f13c4d4d2 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -1642,6 +1642,15 @@ void cWSSAnvil::LoadArrowFromNBT(cEntityList & a_Entities, const cParsedNBT & a_
Arrow->SetDamageCoeff(a_NBT.GetDouble(DamageIdx));
}
+ // Load block hit:
+ int InBlockXIdx = a_NBT.FindChildByName(a_TagIdx, "xTile");
+ int InBlockYIdx = a_NBT.FindChildByName(a_TagIdx, "yTile");
+ int InBlockZIdx = a_NBT.FindChildByName(a_TagIdx, "zTile");
+ if ((InBlockXIdx > 0) && (InBlockYIdx > 0) && (InBlockZIdx > 0))
+ {
+ Arrow->SetBlockHit(Vector3i(a_NBT.GetInt(InBlockXIdx), a_NBT.GetInt(InBlockYIdx), a_NBT.GetInt(InBlockZIdx)));
+ }
+
// Store the new arrow in the entities list:
a_Entities.push_back(Arrow.release());
}
@@ -2474,8 +2483,6 @@ bool cWSSAnvil::LoadProjectileBaseFromNBT(cProjectileEntity & a_Entity, const cP
}
a_Entity.SetIsInGround(IsInGround);
- // TODO: Load inTile, TileCoords
-
return true;
}