1
0

Item frame maps (#5258)

+ Send map data when item frame spawns.
+ Add some casts to placate compiler warnings.

* size_t for array access.
* Mark chunk dirty when rotation or item in item frame is changed.
This commit is contained in:
KingCol13
2021-07-09 18:45:53 +01:00
committed by GitHub
parent 4ec44751e2
commit 68776c4d59
9 changed files with 22 additions and 12 deletions

View File

@@ -770,7 +770,7 @@ void cItemGrid::GenerateRandomLootWithBooks(const cLootProbab * a_LootProbabs, s
// Choose the enchantments
cWeightedEnchantments Enchantments;
cEnchantments::AddItemEnchantmentWeights(Enchantments, E_ITEM_BOOK, 24 + Noise.IntNoise2DInt(a_Seed, TotalProbab) % 7);
cEnchantments::AddItemEnchantmentWeights(Enchantments, E_ITEM_BOOK, static_cast<unsigned>(24 + Noise.IntNoise2DInt(a_Seed, TotalProbab) % 7));
int NumEnchantments = Noise.IntNoise3DInt(TotalProbab, Rnd, a_Seed) % 5; // The number of enchantments this book wil get.
for (int j = 0; j <= NumEnchantments; j++)