-
-
Notifications
You must be signed in to change notification settings - Fork 64
Lavish Livestock #1194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Lavish Livestock #1194
Conversation
947205d to
6e5bb63
Compare
|
After some back and forth I have discarded the plan to make this work with Gemini. Gemini needs a more comprehensive update in a separate PR, see #1196. |
runcows
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm personally a bit hesitant and unconvinced about the use of templates here, as opposed to more traditional mcfunction methods or even just bolt (since I believe this is doable without separate function chains for each animal type).
I'm not necessarily asking for that to be changed though, since this works. And it can always be changed later :P
Here's a bunch of other review comments. Additionally, this has no guidebook entry right now, which probably should be added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
init should not be in the templates, as this will put it under gm4_lavish_livestock:<animal>/init which is incorrect for a whole host of reasons and I'm actually not sure how/if it was running at all.
| execute unless score $parent_a gm4_lavish_livestock_size matches -2147483648..2147483647 run return run scoreboard players operation $parent_a gm4_lavish_livestock_size = @s gm4_lavish_livestock_size | ||
| execute unless score $parent_b gm4_lavish_livestock_size matches -2147483648..2147483647 run return run scoreboard players operation $parent_b gm4_lavish_livestock_size = @s gm4_lavish_livestock_size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be more readable to initialize $parent_a and $parent_b to -1 as a default "uninitialized value" in revoke_advancement and test for that here, rather than testing for any score at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, resetting is worst than setting to a known "uninitialized value"
| # run from gm4_lavish_livestock:{{ entity_id }}/find_marker | ||
|
|
||
| # cache parent size | ||
| scoreboard players reset $size gm4_lavish_livestock_size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resetting the size is unnecessary when assigning the value one command later.
|
|
||
| ### Features | ||
| - Breeding livestock may result in offspring that is abnormally large | ||
| - Larger individuals drop more loot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be more clear to swap "individuals" with "livestock" or "animals". While it's unlikely to cause much confusion, I still think it would be better to be more specific.
| @@ -0,0 +1,15 @@ | |||
| { | |||
| "criteria": { | |||
| "breed_pigs": { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "breed_pigs": { | |
| "breed_livestock": { |
BPR02
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs some changes as mentioned by @runcows. But looks pretty good. Could use a guidebook entry.
| def beet_default(ctx: Context): | ||
|
|
||
| # load csv | ||
| csv = CSV.from_file(Path('gm4_lavish_livestock', 'raw', 'livestock.csv')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need a CSV for this? Why not a json file or even just a list in this python script
| # prepare list of supported entities | ||
| entity_ids = [e.get('entity_id', "").removeprefix('minecraft:').strip() for e in csv] | ||
|
|
||
| # for each wood type in the vanilla doors tag, render a copy of the "templates" directory with the appropriate wood-type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment is copied from double doors
| execute unless score $parent_a gm4_lavish_livestock_size matches -2147483648..2147483647 run return run scoreboard players operation $parent_a gm4_lavish_livestock_size = @s gm4_lavish_livestock_size | ||
| execute unless score $parent_b gm4_lavish_livestock_size matches -2147483648..2147483647 run return run scoreboard players operation $parent_b gm4_lavish_livestock_size = @s gm4_lavish_livestock_size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, resetting is worst than setting to a known "uninitialized value"
Introduces the Lavish Livestock module which allows players to gain access to slightly larger versions of livestock via selective breeding.
How it works
When a player breeds one of the supported mobs (chickens, cows, mooshrooms, pigs, rabbits, sheep, and hoglins), there is a 5% chance for the baby to be one-size-up from one of the parents (the parent is picked at random).
Two size variations exist; +12.5% and +25%.
On death, these size variations drop more loot; up to 3×base loot for +12.5% and up to 5×base loot for +25%.
TODO
Compatibility with Gemini (currently load order dependent)Should be done in a separate PRCompatibility with Pig Tractors (larger pigs should til more tiles)Should be done in a separate PR