mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-05 15:19:07 +02:00
NBT: unify API of different array types
This commit is contained in:
parent
c313db2994
commit
466f393d26
4 changed files with 17 additions and 9 deletions
|
@ -58,7 +58,7 @@ private:
|
|||
|
||||
uint8_t getBiomeAt(size_t x, size_t z) const {
|
||||
if (biomeBytes)
|
||||
return biomeBytes->getValue()[z*SIZE + x];
|
||||
return biomeBytes->getValue(z*SIZE + x);
|
||||
else
|
||||
return biomeInts->getValue(z*SIZE + x);
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
if (!blockLight)
|
||||
return 0;
|
||||
|
||||
return getHalf(blockLight->getValue(), x, y, z);
|
||||
return getHalf(blockLight->getPointer(), x, y, z);
|
||||
}
|
||||
|
||||
static std::unique_ptr<Section> makeSection(const std::shared_ptr<const NBT::CompoundTag> §ion, uint32_t dataVersion);
|
||||
|
@ -91,11 +91,11 @@ private:
|
|||
|
||||
|
||||
uint8_t getBlockAt(size_t x, size_t y, size_t z) const {
|
||||
return blocks->getValue()[getIndex(x, y, z)];
|
||||
return blocks->getValue(getIndex(x, y, z));
|
||||
}
|
||||
|
||||
uint8_t getDataAt(size_t x, size_t y, size_t z) const {
|
||||
return getHalf(data->getValue(), x, y, z);
|
||||
return getHalf(data->getPointer(), x, y, z);
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue