[mod] Wooden Bucket [1.0.1] [bucket_wooden]

minerman
Member
Posts: 23
Joined: Sat Mar 07, 2020 11:01

Re: [mod] Wooden Bucket [1.0.1] [bucket_wooden]

by minerman » Post

pampogokiraly wrote:Every mod that have some bowl have the same recipe:

Code: Select all

plank, nothing, plank
nothing, plank, nothing
so you better change the BUCKET to this:

Code: Select all

plank, nothing, plank
plank, nothing, plank
nothing, plank, nothing
Thanks! this is very useful!

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

Re: [mod] Wooden Bucket [1.0.1] [bucket_wooden]

by j0j0n4th4n » Post

Regular buckets can take milk from cows, would it be possible to do the same with the wooden bucket?
cdb_894a100ddd76

Clickety
New member
Posts: 9
Joined: Sun May 15, 2022 11:30

Re: [mod] Wooden Bucket [1.0.1] [bucket_wooden]

by Clickety » Post

Coincidentally I posted about that here:

viewtopic.php?f=11&t=9917&hilit=tenplus&start=2275

where I put the code snippet that allows milking a cow with a wooden bucket.

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [mod] Wooden Bucket [1.0.1] [bucket_wooden]

by Hume2 » Post

Interesting question. I think, you should delegate this request to the developers of the mods which add cows into game. If that is not an option, you (or somebody) should make a mod which adds this inter-operability. I can help you with it in that case.

Generally, the more complex mods should depend on the more basic mods. At least I think that wooden bucket is way more simple than a set of animals. So given that, the animal mods should more likely support this mod and not vice-versa.

There is not a single mod for cows and milk, which means that I would have to support all of them. And maybe someone invents another usage for buckets which could apply to wooden bucket also. In such case, I would have to add support for that thing also. That would lead to adding too much bloat and only a part of it would be used at a time.
If you lack the reality, go on a trip or find a job.

Clickety
New member
Posts: 9
Joined: Sun May 15, 2022 11:30

Re: [mod] Wooden Bucket [1.0.1] [bucket_wooden]

by Clickety » Post

Ooh! A reply! I just posted to the Mobs Redo thread because I'd forgotten that I need to define a wooden milk bucket in either bucket_wooden or mobs_animal, adding the code that could be added to either the bucket mod or the mob mod, and saying that I was editing the bucket mod for compatibility and hoping to present the end result sometime, but the thread was two years old; so I wasn't expecting it to still be active.

You are right that complex mods should really depend on basic ones, and this is part of what's giving me problems. (The other part is that I'm a noob and barely know what I'm doing.) Farming Redo supports bucket_wooden in a small way that isn't entirely correct; it distinguishes between water and river water - the first has to be purified to make the second, which is needed for kitchen recipes - but for wooden buckets, it doesn't. To solve this, I ended up making more bucket groups, which I felt belonged in bucket_wooden.

Then I defined buckets with different contents, which I felt also belonged in bucket_wooden so at least there would be just one content type that all mods can use (like one milk bucket for all milk mods) and added wooden bucket recipes, but this seriously bloated init.lua. So in init.lua itself, I checked for each mod I knew that might use wooden buckets, made a separate lua file for each and ran those from init.lua. Like, xblox.lua, manim.lua (for mobs_anim) andsoforth. It's still a big mess, though.

You are completely right, I should leave bucket_wooden as is and make a compatibility mod that sits between it and the mods that use it. The compatibility mod would depend on it and overwrite the wooden bucket to add groups, but would otherwise do the job of defining a new bucket-with-content and copying/overwriting other mods' bucket recipes with wooden versions.

A compatibility mod also means neither bucket_wooden nor the other mods would need to change (except milking the cow, the only way to do that was add the possibility of a wooden bucket to the cow object code). It means a lot of replacing recipes with other recipes, especially those that use more than one bucket. But it also means the changes are all in one place.

The code I've written so far has become a huge mess and my head is spinning a bit at the thought of transplanting it to a new mod, but I'll work on that in the weeks to come and post again when I've got something.

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Notice

by TenPlus1 » Post

- Mobs Animal now lets you use wooden bucket mod to milk cows and for recipes :)

Clickety
New member
Posts: 9
Joined: Sun May 15, 2022 11:30

Re: [mod] Wooden Bucket [1.0.1] [bucket_wooden]

by Clickety » Post

I just read about the latest change to Mobs Animal. This means I have to torque the compatibility mod a little, but it still needs a lot of work done anyway; also, it makes it unnecessary for milk only, which is a good thing as I think most users just want to start milking the cow instead of waiting for me to finish a mod properly.

The compatibility mod, mentioning the Mobs Animal update, is posted here: viewtopic.php?p=410729#p410729

While it works with Wooden Bucket 1.0.1, I've updated bucket_wooden to Wooden Bucket 1.0.2 for personal use, downloadable here if the creator wants to see it:

http://www.simania.nl/minetest/bucket_wooden102.zip

The only changes are:

-making bucket_wooden backwards compatible with translations (code copied from Mobs Redo) and consequently, adding intllib as an optional dependence (I haven't installed intllib, so didn't test it, but I trust the Mobs Redo code) and a "locale" directory,

-adding "Wooden" to the filled buckets' names and putting those names in locale/template.txt,

-clearing out the farming:bowl and ethereal:bowl recipes before the bucket recipes to avoid invalid bowl recipes showing up in the crafting guide, and

-adding a readme.md file.

These changes are not needed for the mod to work, they're just meant as a contribution.

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

Re: [mod] Wooden Bucket [1.0.1] [bucket_wooden]

by Blockhead » Post

Clickety wrote:
Sun May 29, 2022 12:14
While it works with Wooden Bucket 1.0.1, I've updated bucket_wooden to Wooden Bucket 1.0.2 for personal use, downloadable here if the creator wants to see it:

http://www.simania.nl/minetest/bucket_wooden102.zip
Hi, and thanks for your contribution. You seem like you may be new to contributing to git projects. While Hume2 can download your version and apply it on top of his version of the code, there are ways to contribute that can save more of his time by making it easier for him to merge your changes.

The easiest way to contribute to a project that uses a Git hoster like GitHub, GitLab etc. is to sign up for an account there, fork the software, and make a Pull/Merge request with your changes, by committing your changes with git. There is plenty of advice out there on the internet about how to use git, but in short: use git clone your fork to get the mod via git, then modify the files, then git add . to track all your changes in git, then git commit to add your changes, and then git push to your fork's URL, and then make the Pull/Merge request.

Second to that, you can often contribute via patches. This can be desirable if, for example, you don't want to sign up at some website just to contribute. You can git clone the repository as before, and then after making changes you can run git diff and as long as you didn't change anything except text files, (not e.g. any textures, models) you can post the output of git diff here on the forums in a [ code ] tag. It gets more complicated if you changed binary files, you need to actually commit the change and then use git format-patch HEAD^ (one ^ for each commit you made). After making the patches, if you're going to be posting them on the forums, please redact your name and email if you don't want those on the forums, which I think could probably create spam problems for you. The author can apply this patch with git apply and commit it while crediting you (for committers, if your patch doesn't have the authorship info at the top: git commit --author=name <email>).
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [mod] Wooden Bucket [1.0.1] [bucket_wooden]

by Hume2 » Post

Clickety wrote:
Sun May 29, 2022 12:14
I just read about the latest change to Mobs Animal. This means I have to torque the compatibility mod a little, but it still needs a lot of work done anyway; also, it makes it unnecessary for milk only, which is a good thing as I think most users just want to start milking the cow instead of waiting for me to finish a mod properly.

The compatibility mod, mentioning the Mobs Animal update, is posted here: viewtopic.php?p=410729#p410729

While it works with Wooden Bucket 1.0.1, I've updated bucket_wooden to Wooden Bucket 1.0.2 for personal use, downloadable here if the creator wants to see it:

http://www.simania.nl/minetest/bucket_wooden102.zip

The only changes are:

-making bucket_wooden backwards compatible with translations (code copied from Mobs Redo) and consequently, adding intllib as an optional dependence (I haven't installed intllib, so didn't test it, but I trust the Mobs Redo code) and a "locale" directory,

-adding "Wooden" to the filled buckets' names and putting those names in locale/template.txt,

-clearing out the farming:bowl and ethereal:bowl recipes before the bucket recipes to avoid invalid bowl recipes showing up in the crafting guide, and

-adding a readme.md file.

These changes are not needed for the mod to work, they're just meant as a contribution.
Thanks for your improvements, I added them to the official repo.
If you lack the reality, go on a trip or find a job.

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Information:

by TenPlus1 » Post

- Mobs_Animal Cow can now be milked using both wooden bucket mods.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 12 guests