Try to update Milo for 1.19

Removes Milo trying to access damage on items (`nil` because of The
Flattening). We might also need to reimplement showing durability in the
item's display name - I got a little too carried away with removing
mentions of "damage". Also renames nbtHash to nbt to be consistent with
new CC:T naming. I tried not to touch anything related to MiloRemote for
now, and there are probably still many bugs remaining that need to be
ironed out. Most of the basic functionality works now, though.
This commit is contained in:
Kan18
2022-12-24 15:33:01 +04:00
parent 2461d060e0
commit 2f67fb2ef8
16 changed files with 101 additions and 100 deletions

View File

@@ -15,14 +15,13 @@ function ReplenishTask:cycle(context)
local _, count = Milo:getMatches(item, res)
if count < res.low then
local nbtHash
if not res.ignoreNbtHash then
nbtHash = item.nbtHash
local nbt
if not res.ignoreNbt then
nbt = item.nbt
end
Milo:requestCrafting({
name = item.name,
damage = res.ignoreDamage and 0 or item.damage,
nbtHash = nbtHash,
nbt = nbt,
requested = res.low - count,
count = count,
replenish = true,