-
Some inventories like the vanilla Brewing Stand have hard restrictions on what items can be placed in them (unlike Blast Furnaces, which allow you to insert arbitrary items regardless of whether they're blastable). I'd like to be able to detect these restrictions. For context: I have an algorithm which tries to move items from one arbitrary group of However, since I don't know how to detect item restrictions on the destination slots, the algorithm assumes the destination slot is successfully filled by the item in the lowest numbered slot in the origin group (even if it is incompatible), and will not generate an |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Could you not modify your code to read |
Beta Was this translation helpful? Give feedback.
Sadly there isn't really a generic way to do this. Minecraft doesn't expose any information about what items can be inserted into a slot, so the only way you can do it is to try and see.
I don't think this is too bad. Typically M is going to be small - things like brewing stands or furnaces are only a couple of slots. I guess if you have a chest full of items, you'd have to try$5 \times 27 = 135$ different combinations (though note you could do some of these in parallel) — mayb…