| 919 | |
| 920 | |
| 921 | void cWSSAnvil::LoadNoteFromNBT(cBlockEntityList & a_BlockEntities, const cParsedNBT & a_NBT, int a_TagIdx) |
| 922 | { |
| 923 | ASSERT(a_NBT.GetType(a_TagIdx) == TAG_Compound); |
| 924 | int x, y, z; |
| 925 | if (!GetBlockEntityNBTPos(a_NBT, a_TagIdx, x, y, z)) |
| 926 | { |
| 927 | return; |
| 928 | } |
| 929 | std::auto_ptr<cNoteEntity> Note(new cNoteEntity(x, y, z, m_World)); |
| 930 | int note = a_NBT.FindChildByName(a_TagIdx, "note"); |
| 931 | if (note >= 0) |
| 932 | { |
| 933 | Note->SetPitch(a_NBT.GetByte(note)); |
| 934 | } |
| 935 | a_BlockEntities.push_back(Note.release()); |
| 936 | } |
| 937 | |
| 938 | |
| 939 |
nothing calls this directly
no test coverage detected