Finding the amount of items in a stack(SOLVED)

Locked
User avatar
qwrwed
Member
Posts: 325
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

Finding the amount of items in a stack(SOLVED)

by qwrwed » Post

In Minearriatest's Jungletools mod, there is a grinder node. This grinder's formspec has 2 slots (input, output) and a button (Grind). However, on clicking Grind, only one item is removed from the input slot, and only 1 is added to the output. Is there a way to find the amount of jungletools:jungle_spore craftitems in the input slot and add that many jungletools:jungle_dust to the output slot on_recieve_fields?
+ Spoiler
EDIT: I used stack:get_count().
Last edited by qwrwed on Wed Jan 01, 2014 15:17, edited 1 time in total.

User avatar
Krock
Developer
Posts: 4577
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

by Krock » Post

I don't like to say this but: use ABM's
There are serval examples in minetest_game, just browse through them, you'll surely find some.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
qwrwed
Member
Posts: 325
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

by qwrwed » Post

I found a better solution for what I have in mind: stack:get_count(). I found this while looking for the furnace ABM so thanks, Krock.

User avatar
Minearriatest
Member
Posts: 34
Joined: Mon Nov 25, 2013 18:28
Location: United Kingdom

by Minearriatest » Post

Modding a Mod, seems legit.
Minetest user name: asg
Try out some mods which I contributed in:
Jungle Tools(made) Ice + Magma Tools(contributed) Ultimate Tools(made)

Locked

Who is online

Users browsing this forum: Bing [Bot], MisterE and 2 guests