1
0

Use pitch lookup in noteblock block entity (#4826)

- Removed the calculation in the noteblock block entity

I did the calculation in python if anyone is interested where the numbers are from

Co-authored-by: 12xx12 <12xx12100@gmail.com>
This commit is contained in:
12xx12
2020-09-05 17:07:01 +02:00
committed by GitHub
parent 040380321c
commit 2d197e147e
6 changed files with 220 additions and 50 deletions

View File

@@ -1419,7 +1419,7 @@ OwnedBlockEntity cWSSAnvil::LoadNoteBlockFromNBT(const cParsedNBT & a_NBT, int a
int note = a_NBT.FindChildByName(a_TagIdx, "note");
if (note >= 0)
{
NoteBlock->SetPitch(static_cast<char>(a_NBT.GetByte(note)));
NoteBlock->SetNote(static_cast<char>(a_NBT.GetByte(note)));
}
return NoteBlock;
}