Banner Patterns!

Banner Patterns, some lighting fixes, and loot-table nbt!
This commit is contained in:
Tranqlmao
2026-07-14 20:31:05 -04:00
parent 93f1d55db9
commit d7a08122c7
7 changed files with 169 additions and 28 deletions
+11
View File
@@ -4,6 +4,7 @@
#include "LootTableManager.h"
#include "WeighedRandom.h"
#include "WeighedTreasure.h"
#include "EnchantmentHelper.h"
#include <vector>
@@ -21,6 +22,16 @@ namespace
shared_ptr<ItemInstance> item = std::make_shared<ItemInstance>(drop.itemId, 1, drop.data);
if (drop.damageFraction > 0.0)
{
item->setAuxValue((int)((double)item->getMaxDamage() * drop.damageFraction));
}
if (drop.enchantLevels > 0)
{
EnchantmentHelper::enchantItem(random, item, drop.enchantLevels);
}
if (item->getMaxStackSize() >= drop.count)
{
shared_ptr<ItemInstance> copy = item->copy();