itemdb potion hack

This commit is contained in:
kepler155c
2018-11-14 14:22:43 -05:00
parent 1328fc233a
commit a460bc31f3

View File

@@ -115,6 +115,11 @@ function itemDB:add(baseItem)
nItem.maxCount = baseItem.maxCount nItem.maxCount = baseItem.maxCount
nItem.maxDamage = baseItem.maxDamage nItem.maxDamage = baseItem.maxDamage
-- potions can have the same damage, diff nbts, but same names
-- ie. potion of healing, potion of healing II
-- both show as "Potion of Healing"
if nItem.name ~= 'minecraft:potion' --[[ HACK ]] then
for k,item in pairs(self.data) do for k,item in pairs(self.data) do
if nItem.name == item.name and if nItem.name == item.name and
nItem.displayName == item.displayName then nItem.displayName == item.displayName then
@@ -137,6 +142,7 @@ function itemDB:add(baseItem)
end end
end end
end end
end
TableDB.add(self, self:makeKey(nItem), nItem) TableDB.add(self, self:makeKey(nItem), nItem)
nItem = Util.shallowCopy(nItem) nItem = Util.shallowCopy(nItem)