diff --git a/test-programs/logistics-pipes/pipe_driver.lua b/test-programs/logistics-pipes/pipe_driver.lua index 86e2920..5b98035 100644 --- a/test-programs/logistics-pipes/pipe_driver.lua +++ b/test-programs/logistics-pipes/pipe_driver.lua @@ -23,13 +23,24 @@ function ItemStack:getName() --- check for custom name if self.data.hasTagCompound() then local nbt = self.data.getTagCompound() - if nbt.value.display and nbt.value.display.value.Name then + -- if Long arry is in the NBT complex logistic pipes fails to + -- serialize the NBT resulting in a empty nbt + if not nbt then + return self.data.getName() .. " " + elseif nbt.value.display and nbt.value.display.value.Name then return nbt.value.display.value.Name.value end end return self.data.getName() end +function ItemStack:getId() + if not self.data.hasTagCompound() then + return self.data.getIdName() .. "." .. self.data.getData() + end + return "complex" +end + -------------------------------------------------------------------------------- ----------------------------- ItemCollection Class ----------------------------- --------------------------------------------------------------------------------