[Mod] Blocks of food [v1.2.1] [foodblocks]

Post Reply
User avatar
Blockhead
Member
Posts: 630
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

[Mod] Blocks of food [v1.2.1] [foodblocks]

by Blockhead » Post

Foodblocks for Minetest

Image

FAQ
This mod adds large blocks for various types of food from the farming, farming_redo & farming_undo, and ethereal mods for Minetest Game, and for the mcl_farming in Mineclone2. They are crafted out of 9 of the original food item and each one comes with a custom texture like a giant cube version of that block.

Q: Isn't this a bit silly? What should I do with these blocks?

A: Yes, very silly. You could use them to build a house if you really wanted.

Q: Does this mean plants will now grow into blocks?

A: No, you have to craft the foodblocks out of plants you have already
harvested.

Q: What do the foodblocks drop?

A: 9 items by default, but see the section on configuration.

Installation
Get it via ContentDB, or download current version, v1.2.1 here: https://github.com/Montandalar/foodbloc ... v1.2.1.zip

Download the source from my GitHub.

Foodblocks requires Minetest 5 as it uses the translation feature built in to that version, but you could easily backport it to intllib on 0.4.x if you direly need to keep using that version.

This mod depends on farming, but that can be provided by the farming mod installed with Minetest Game (this gives only apples and blueberries), Tenplus1's farming_redo or Felfa's farming_undo fork of farming_redo; or with mcl_farming which is included with Mineclone2. It will detect which version you have installed and register the appropriate nodes.

There is an optional dependency on ethereal which will register blocks from the edible plants of ethereal.


Recipes

All of these blocks are crafting by filling the 3x3 crafting grid with the appropriate harvested plant.


Configuration

You can configure whether foodblocks will drop themselves directly, or 9 of the item that they were crafted out of. The default is to drop 9 of the item, similarly to melons or pumpkins in Mineclone. Regardless of the setting, the foodblocks will always drop themselves directly if the game is in creative mode, or in Mineclone2 when using a silk touch pickaxe. The check for creative applies to global creative mode only, not for players with the `creative` privilege.

Since blueberries were introduced to Minetest Game, but already existed in farming, this mod lets you decide what you want the blueberry blocks to drop: default blueberries, wild blueberries (from farming) or the type they were crafted from.

See settingtypes.txt and the in-game configuration menu for more information.


API

You can register your own food blocks in your mod with the external API table `foodblocks`. Read the source for more information. Contributions back to this mod are welcome as well depending on how you want mod dependencies to work.

Licences

(C) 2021-2022 Blockhead unless otherwise specified

The code of this mod is licensed under the GNU Affero General Public License, version 3, available from the GNU Project. This means any modifications or forks you make to the mod and use on a minetest server have to be published online. Read the AGPL online here.

The art assets of this mod are licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC BY-SA 3.0). View this licence online here.
Attachments
screenshot.jpg
screenshot.jpg (477.01 KiB) Viewed 1848 times
Last edited by Blockhead on Tue Aug 09, 2022 03:31, edited 5 times in total.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

User avatar
ywwv
Member
Posts: 296
Joined: Mon Jan 18, 2021 11:51

Re: [mod] Blocks of food [foodblocks]

by ywwv » Post

im going to buyld a house and then eat it

Ignaramico
Member
Posts: 78
Joined: Fri Sep 04, 2020 21:23
GitHub: ignaramico

Re: [Mod] Blocks of food [v1] [foodblocks]

by Ignaramico » Post

noe if you misplace a block, you can eat it to scare the others xD

User avatar
ywwv
Member
Posts: 296
Joined: Mon Jan 18, 2021 11:51

Re: [Mod] Blocks of food [v1] [foodblocks]

by ywwv » Post

Ignaramico wrote:
Fri Feb 05, 2021 23:18
noe if you misplace a block, you can eat it to scare the others xD
they will tremble be fore me . I will be the state .

User avatar
Blockhead
Member
Posts: 630
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Non-vegan options?

by Blockhead » Post

Hi people, I'm looking to gauge interest. Is anyone interested in some non-vegan options like meat blocks? Also, I know there other blocks out there like chocolate, cheese and possibly others in other mods and I'm looking to not duplicate with any of those.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

User avatar
j0j0n4th4n
Member
Posts: 161
Joined: Tue Jan 26, 2021 06:45

Re: [Mod] Blocks of food [v1] [foodblocks]

by j0j0n4th4n » Post

Are those edible or just decoration?

User avatar
Blockhead
Member
Posts: 630
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: [Mod] Blocks of food [v1] [foodblocks]

by Blockhead » Post

j0j0n4th4n wrote:
Wed Feb 23, 2022 18:11
Are those edible or just decoration?
You have to break them, which drops the 9 items used to craft them, and then you can eat them. Like watermelons and pumpkins in Mineclone. Are you asking for an integration with hunger mods so they can be eaten directly from the world?
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

User avatar
j0j0n4th4n
Member
Posts: 161
Joined: Tue Jan 26, 2021 06:45

Re: [Mod] Blocks of food [v1] [foodblocks]

by j0j0n4th4n » Post

Somewhat, yes. The way you described you can't get the blocks and place it somewhere else for decoration. If you could get them and eat the block directly later the mod would be more versatile

User avatar
Blockhead
Member
Posts: 630
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: [Mod] Blocks of food [v1] [foodblocks]

by Blockhead » Post

j0j0n4th4n wrote:
Thu Feb 24, 2022 18:00
Somewhat, yes. The way you described you can't get the blocks and place it somewhere else for decoration. If you could get them and eat the block directly later the mod would be more versatile
I'm not really sure if eating an entire cubic metre of food at once is healthy or sensible though. It's better to tear it apart and eat the pieces. Also the mod doesn't integrate to any food mods yet. The food mod I'm used to using is hbhunger, and in that mod a banana can restore 6/30 hunger at once, so eating a banana block would restore 54 hunger, which is more than the hunger cap. It might be similar if you use the simpler 'eat to heal' system as well. Still, yes, the mod could be made configurable to allow eating the blocks with integration to hunger mods, although it's another abstraction layer to deal with both multiple farming mods and multiple hunger mods.

I could also make it configurable as to whether the blocks drop themselves directly or their constituents (as it is now), which would also mean the mod would also need to register a recipe to break the blocks up into their 9 pieces.

Are you requesting one or both of the above features?
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

User avatar
j0j0n4th4n
Member
Posts: 161
Joined: Tue Jan 26, 2021 06:45

Re: [Mod] Blocks of food [v1] [foodblocks]

by j0j0n4th4n » Post

Hum, originally both but after reading your reply I can see how "eating an entire cubic meter of food" option would be problematic, lol. The second feature, the blocks dropping themselves is something I still think should be done as it would give us more building materials and decorations

User avatar
Blockhead
Member
Posts: 630
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: [Mod] Blocks of food [v1] [foodblocks]

by Blockhead » Post

j0j0n4th4n wrote:
Fri Feb 25, 2022 16:48
Hum, originally both but after reading your reply I can see how "eating an entire cubic meter of food" option would be problematic, lol. The second feature, the blocks dropping themselves is something I still think should be done as it would give us more building materials and decorations
Well, okay I think I will, just for player choice, but have you actually tried the mod yet? The blocks aren't found out in the world, they're crafted. So the blocks don't have to drop themselves directly for you to be able to build with them, you just harvest plants from the farming mod than squish them together, voila, you have foodblocks.

Edit: Maybe the OP wording is unclear and you think the blocks themselves are growable? I think I need to reword a bit so there's no confusion. Will still add the 'drop themselves' option just in case anyone wants it regardless.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

User avatar
j0j0n4th4n
Member
Posts: 161
Joined: Tue Jan 26, 2021 06:45

Re: [Mod] Blocks of food [v1] [foodblocks]

by j0j0n4th4n » Post

I have tested them in creative to see how they look, but still haven't played with the mod on a survival world, so I was on the impression they were an growable.

User avatar
freshreplicant
Member
Posts: 182
Joined: Sun Aug 09, 2020 10:37
In-game: freshreplicant

Re: [Mod] Blocks of food [v1] [foodblocks]

by freshreplicant » Post

I think the current behaviour is perfect, it'd be annoying if you're building a pineapple house and miss click and then have to destroy it and end up with a bunch of pineapples again. I see it as the food equivalent of diamond/coal blocks in Mine* games.

User avatar
Blockhead
Member
Posts: 630
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: [Mod] Blocks of food [v1] [foodblocks]

by Blockhead » Post

freshreplicant wrote:
Sat Feb 26, 2022 20:40
I think the current behaviour is perfect, it'd be annoying if you're building a pineapple house and miss click and then have to destroy it and end up with a bunch of pineapples again. I see it as the food equivalent of diamond/coal blocks in Mine* games.
That's not the current behaviour though, the current behaviour is to drop the pineapples. Clearly people want this behaviour so expect the next update to make it configurable.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

User avatar
Blockhead
Member
Posts: 630
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Foodblocks v1.1.0 released

by Blockhead » Post

Hello all. Today's update to foodblocks brings:
  • A new setting to configure whether foodblocks should drop themselves directly. The default is still the old behaviour which is for them to drop 9 of their constituent items.
  • Support for MineClone2: Beetroot, carrot, potato and poison potato blocks are available under vanilla MineClone2.
Attachments
FoodBlocksv1.1.0-releaseimg.jpeg
FoodBlocksv1.1.0-releaseimg.jpeg (201.73 KiB) Viewed 1566 times
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

User avatar
Blockhead
Member
Posts: 630
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: [Mod] Blocks of food [v1.1.0] [foodblocks]

by Blockhead » Post

I've just noticed a major oversight in the Mineclone2 support: I didn't include apples! I'd like to gauge opinions first before I rectify this: Should there be golden apple and enchanted golden apple blocks as well? Or just the basic apples?
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

User avatar
debiankaios
Member
Posts: 753
Joined: Thu Dec 03, 2020 12:48
IRC: debiankaios
In-game: debiankaios Nowe
Location: germany
Contact:

Re: [Mod] Blocks of food [v1.1.0] [foodblocks]

by debiankaios » Post

Blockhead wrote:
Thu Apr 07, 2022 05:25
I've just noticed a major oversight in the Mineclone2 support: I didn't include apples! I'd like to gauge opinions first before I rectify this: Should there be golden apple and enchanted golden apple blocks as well? Or just the basic apples?
Yes

User avatar
Blockhead
Member
Posts: 630
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: [Mod] Blocks of food [v1.2.0] [foodblocks]

by Blockhead » Post

Foodblocks v1.2.0 is released! In this release:
  • Added Apple, Golden Apple and Enchanted Golden Apple blocks under Mineclone2.
  • Updated the German translation to support Mineclone2 (this covers v1.1.0 and v1.2.0).
  • Added a small screenshot.png for the in-game mod manager (Content tab)
Debiankaios: A review of the German translation and also on ContentDB would be nice :)
Attachments
Foodblocks-v1.2.0-releaseimg.jpeg
Foodblocks-v1.2.0-releaseimg.jpeg (159.56 KiB) Viewed 1118 times
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

W3RQ01
Member
Posts: 78
Joined: Sat Nov 28, 2020 06:33
GitHub: W3RQ01
In-game: Dario23 or W3RQ01
Contact:

Re: [Mod] Blocks of food [v1.2.0] [foodblocks]

by W3RQ01 » Post

I have this problem, game crashes and debug.txt gives me this error

Code: Select all

ModError: Failed to load and run script from /home/*****/.minetest/games/RLminetest_game-5.4.1/mods/foodblocks-1.2.0/init.lua:
 ERROR[Main]: ...t/games/RLminetest_game-5.4.1/mods/creative/init.lua:37: core.check_player_privs expects a player or playername as argument.
 ERROR[Main]: stack traceback:
 ERROR[Main]: 	[C]: in function 'error'
 ERROR[Main]: 	/usr/share/minetest/builtin/game/misc.lua:11: in function 'check_player_privs'
 ERROR[Main]: 	...t/games/RLminetest_game-5.4.1/mods/creative/init.lua:37: in function 'is_creative_enabled'
 	...RLminetest_game-5.4.1/mods/foodblocks-1.2.0/init.lua:4: in main chunk
 ERROR[Main]: Controlla debug.txt per i dettagli.
 ACTION[Main]: Server: Shutting down

User avatar
Blockhead
Member
Posts: 630
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: [Mod] Blocks of food [v1.2.0] [foodblocks]

by Blockhead » Post

Thank you for that report W3RQ01. I have fixed the issue, and made a new release, v1.2.1, which fixes this crash. I'm not sure why it didn't crash previously, but it doesn't any more :)
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests