Diamond Pipes and NBT Data
ph1x3r opened this issue · 14 comments
There is a problem where all of the forestry saplings are matching the first sapling in a row of diamond pipes.
I only found this because of the (huge) auto sorting system I built that tries to put different types of items into separate chests.
The item id I see for vanilla saplings is 6:x where 'x' specifies the type. However, the only item ID I see in-game for the forestry saplings is 13384 and no specifier after.
The game inventory seems to be able to tell the difference when handling the items, but the diamond pipe is not selecting correctly.
Not a show-stopper, but it is annoying when I only want oak saplings going into the fermenter since I have so many of them :)
Thanks.
Ph1x3r
buttons seem so inelegant.
But the ability to sort things based on forge dictionary equivalence would be awesome too.
No one took ownership on this yet, so closing it for now. Feel free to discuss further on http://mod-buildcraft.com/forums/index.php?board=4.0.
None of the BC stuff takes NBT into account when sorting items. It has been discussed at length internally but no concrete reasoning was ever reached as to whether this was a "good" or "bad" thing.
Ok. Good to know. A lot of my stuff uses NBT but also damage that is a short representation for the NBT (like full or empty) but i would tell BC should add a sorting pipe that take care of NBT. Maybe new type of Sorting pipe. Maybe with a Chipset on top of it (in a recipe) or something like that. But that should be a thing what Buildcraft should implement because a lot of Mods start to use NBT, like forestry, Factorisation, IC2, (Not sure about TE), my Mods also.
mayby sugest it on forestry to make that extra pipe, they have there apiarist pipe, they could make an pipe for saplings
@50Wliu and @AEnterprise: Why do you suggest this is a Forestry problem?
The diamond pipe is part of Buildcraft. That is the object that doesn't know how to handle the data it gets from another mod.
As CovertJaguar has indicated, it seems the issue is known about, but no decision has been made on how to handle the issue yet.
As to having Forestry write a new pipe just for saplings. Why? That would seem to be a duplication of code as it would have to handle the same thing as the BC pipes.
Surely this is just a case of determining how Forestry differentiates between the items and then adding that logic to the current BC code. I have never looked at the code for minecraft mods, so I cannot determine how difficult this would be.
Forestry exposes an API for developers which allows them to access sapling information etc. Im pretty sure the Apiarist pipe uses this Api from within forestry's codebase. It's also how ExtraBees works.
On the other hand Buildcraft also has an api for this sort of thing which is how the Apiarist pipe exists.
Due to this its a forestry feature suggestion. Custom pipes for mods should go where similar already existing pipes go. In forestry. Its kinda weird to ask BC developers to make this as they've provided everything you'd need to do this outside of their codebase through the API.
Alternatively you could grab both APIs and make your own pipes as part of a separate mod which is what Binnie did.
@ph1x3r, the following led me to believe it's a Forestry issue:
However, the only item ID I see in-game for the forestry saplings is 13384 and no specifier after.
The way you're saying it is making it seem like Forestry is not adding the "specifier" for BC to identify what kind of sapling it is.
You should ignore anything after the colon mostly. That is only half of it and is usually used for structural blocks that contain no extra code some stuff with extra code might use metadata in the ID but this doesn't correlate to the whole picture.
A good example of a thing where metadata is reliable is Wool.
A good example of a thing where metadata is not reliable is a Player Edited Book. (The players text would not fit in the meta data space)
The usual rule you might follow is if this item does something other than place,break,pickup,drop,left click. It probably has this extra data. This data is actually inside the item and cannot be retrieved through item ids alone.
As I said Forestry is supplying everything you would need to achieve this by looking within the actual sapling's data. It is however hard to look at unless you use the Forestry API which tells other mods how to access data within the item/block. As Both BC and Forestry have APIs both of them could technically write the pipe. However it would not be wise for BC to support saplings through the forestry API on the diamond pipe as this would tie BC to forestry too much.
What you could propose is similar to what Covert is talking about where the diamond pipe examines the NBT data without really understanding what it means to check if they match. This is not an absolute science. Applied Energistics does this with its Fuzzy Buses and they work quite well. Besides as mentioned such a thing has been discussed elsewhere and so does not need another issue.
Nothing would beat a fully formed sapling pipe developed with the full features from the forestry API though. Which is why this is should be a Forestry suggestion or for another mod to pickup separate from Forestry and BC
@AnyDevs reading, sorry if the technically information above isn't that accurate. I think its a good summary :(?
@rfox90 doesn't really matter whether the Arborist's Pipe is in BC or Forestry, either way I'd be the one writing it and frankly I have many more critical things on my todo list atm. As much I'd personally love to have such pipe, but meh.
For the record, the Aparist's Pipe is an official part of Forestry, not ExtraBees.
I didn't say it was part of extra bees :).
I've seen screenshots of an Arborist pipe somewhere on twitter and have just checked Binnies and Sengirs image feeds. Not there :(
Den-Pipes adds additional forestry pipes.
On Dec 19, 2013 5:35 AM, "Richard Fox" [email protected] wrote:
I didn't say it was part of extra bees :).
I've seen screenshots of an Arborist pipe somewhere on twitter and have
just checked Binnies and Sengirs image feeds. Not there :(—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1369#issuecomment-30928463
.