summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/WSSAnvil.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-02 22:07:34 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-02 22:07:34 +0200
commit89a26cc786f3673cf7b5a100300d8aa595735cc3 (patch)
treebb730e4d205d596232ad1941d92c7a2c5a5a0e72 /src/WorldStorage/WSSAnvil.cpp
parentVector clamping fixes (diff)
downloadcuberite-89a26cc786f3673cf7b5a100300d8aa595735cc3.tar
cuberite-89a26cc786f3673cf7b5a100300d8aa595735cc3.tar.gz
cuberite-89a26cc786f3673cf7b5a100300d8aa595735cc3.tar.bz2
cuberite-89a26cc786f3673cf7b5a100300d8aa595735cc3.tar.lz
cuberite-89a26cc786f3673cf7b5a100300d8aa595735cc3.tar.xz
cuberite-89a26cc786f3673cf7b5a100300d8aa595735cc3.tar.zst
cuberite-89a26cc786f3673cf7b5a100300d8aa595735cc3.zip
Diffstat (limited to '')
-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 0f84a0eb1..1e9ce80cc 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -1656,6 +1656,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());
}
@@ -2481,8 +2490,6 @@ bool cWSSAnvil::LoadProjectileBaseFromNBT(cProjectileEntity & a_Entity, const cP
}
a_Entity.SetIsInGround(IsInGround);
- // TODO: Load inTile, TileCoords
-
return true;
}