2

Creating a datapack for more renewabilty

Silvachan's Avatar Silvachan3/25/24 4:08 pm
4/6/2024 1:54 pm
mega7's Avatar mega7
I'm currently making a datapack that adds several new recipies or other ways to get currently non-renewable items (wandering trader excluded). The one I'm currently having problems with is dead bushes.

I don't want to just write a crafting recipe because that doesn't make sense to me, so I thought I'd add a function where saplings could sometimes dry out instead of growing a tree. However, I'm stuck on finding the files I'd have to edit or where to put them if I have to create them myself.

Is something like this even possible without modding and if so, where would I find or save the files?
Posted by Silvachan's Avatar
Silvachan
Level 8 : Apprentice Artist
1

Create an account or sign in to comment.

17

1
04/05/2024 12:28 pm
Level 61 : High Grandmaster Sweetheart
imalittlhigh
imalittlhigh's Avatar
I mean, you could just rip my custom trees datapack, and replace the placement of the tree structures with a setblock / or fill with dead bushes ^^
And ofc add a random to that so that not every sapling will turn dead instead of growing
2
04/05/2024 12:40 pm
Level 8 : Apprentice Artist
Silvachan
Silvachan's Avatar
Thanks for the suggestion, I think I will take a look at that for reference. But I wanted it to specifically NOT be a random thing, so it's more controllable. Also, I have a working version now, so I won't change anything for the time being.
1
04/05/2024 4:05 am
Level 8 : Apprentice Artist
Silvachan
Silvachan's Avatar
Update: I have now made a crafting recipe to turn saplings into dead bushes. Since I'm not just crafting a plant out of sticks, this still makes sense to me. The idea just hadn't occurred to me until now. I also made crafting recipes for small dripleaf and coral blocks, so with that, the pack is now finished. All that's left now is testing, the pack image and the download site.
1
04/05/2024 6:52 am
Level 45 : Master Cupcake
mega7
mega7's Avatar
I mean i would've that maybe throwing a sapling into a composter would turn it into a dead bush in 30 seconds or something. That's not hard too do.
2
04/05/2024 9:58 am
Level 8 : Apprentice Artist
Silvachan
Silvachan's Avatar
Thanks for the suggestion, but a crafting recipe makes more sense to me. Besides that, I have no idea how to do something like that, anyway. I'm sure I'll learn in time, as I get better at programming in general, but right now I have other things to focus on.
1
03/25/2024 10:50 pm
Level 36 : Artisan Miner
ScotsMiser
ScotsMiser's Avatar
I'm unable to help with the technicalparts [but will be interested to see the answers].

As a mechansim for generating dead bushes, perhaps this could happen if a sapling recieved a block tick (which would cause growth if on dirt/grass) but was planted on sand. This would make dead bush farming easy, but dead bushes are not so valuable that would likely become and issue...
2
03/26/2024 1:38 amhistory
Level 8 : Apprentice Artist
Silvachan
Silvachan's Avatar
I was actually thinking of having saplings dry out when they try to generate a tree, but fail due to the conditions (light and space) not being met. Also, I don't think saplings can be placed on sand in the first place.
1
03/26/2024 8:29 pm
Level 36 : Artisan Miner
ScotsMiser
ScotsMiser's Avatar
You are correct, saplings cannot be placed on sand (in vanilla).

While making some saplings die and become dead bushes after failed growth checks would be logical, it would also break one of the more common block tick detectors. [​Observer watching blocked sapling linked to a counting mechanism.] These provide a lower lag alternative to long period clocks when precise timing isn't needed.
Breaking this functionality might limit the appeal of your proposed pack, hence the suggested change…
2
03/28/2024 3:23 pmhistory
Level 8 : Apprentice Artist
Silvachan
Silvachan's Avatar
I somewhat see your point (I think, but I'm an absolute noob at redstone, so I wouldn't know about things like that). But I acutally write datapacks mostly for myself and then post them online in case anyone else wants to use them, too.

So I'm honestly not too concerned about breaking some obscure redstone mechanic. I just want to make dead bushes renewable because they're currently not and they're good for decorating. If other people don't want to use the pack because of that, they don't have to. Also, like you already said, dead bushes aren't really all that useful in the first place (further supporting my point of not having to use the pack if you don't want to).

All of that being said, I'm still stuck on those files, though. I really would appreciate some help with that...
1
03/28/2024 10:43 pmhistory
Level 36 : Artisan Miner
ScotsMiser
ScotsMiser's Avatar
Unfortunately, I know little about MC's program structure and don't 'speak' java, so I've not been able to find the needed decision point. [​My assumption is that one would want to do a check every time a sapling recieved a block tick and was unable to grow. Since saplings already do this and invoke the _generate-tree_ module if growth is successful, it ought to be possible to invoke a different module if growth is unsuccessful.]

Anyway, I've marked the thread in case I find the answer and (hopefully) someone who is faclie in this area will drop by…
3
04/04/2024 9:13 pm
Level 36 : Artisan Modder
Lickydog
Lickydog's Avatar
The point is to make a datapack for vanilla Minecraft, not a mod. You can't use the game's internal files anyway. I don't think it's possible with just functions to make this. Maybe it would be possible to detect the growth of a player-placed sapling with an advancement that triggers a function at its position, but I think it would need to grow into a tree if this was the case.
2
03/29/2024 1:43 am
Level 8 : Apprentice Artist
Silvachan
Silvachan's Avatar
I see. Well, thanks anyway
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome