Skip to content
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

[Question] Popcorn Implementation #4

Open
hugeblank opened this issue Jan 15, 2023 · 7 comments
Open

[Question] Popcorn Implementation #4

hugeblank opened this issue Jan 15, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@hugeblank
Copy link
Contributor

I have an idea for how I would implement the popcorn item, but would like to have a bit of a discussion on what the maintainers ideas for it were before I jumped into porting a two block tall crop block, and 2-3 additional items.

@Lemmmy
Copy link
Member

Lemmmy commented Jan 15, 2023

It was intended to be a creative-mode, no-real-use prop for the cinema

@hugeblank
Copy link
Contributor Author

Would there be any objection to making it an obtainable item by means of adding a new crop?

@Lemmmy
Copy link
Member

Lemmmy commented Jan 15, 2023

Could be neat! What do you have in mind?

@hugeblank
Copy link
Contributor Author

My idea was to port over exactly what I did for Bagel's Baking, and introduce a two block tall corn crop. It's analogous to wheat in that it drops a corn item, and then the corn seeds. The corn item can also be crafted down into 4 corn seeds. The popcorn would be created by smelting the seeds, "popping" the kernels in a fictonal, minecrafty sense.

It is usually found on village farmland, in loot chests, and dropped by zombies. Its seeds are also dropped by the same grass blocks that drop seeds. I think since the terrain is already generated, and villages have already been established, it would be pointless to implement it being found in villages, but the rest of the ways to find it I think are worth doing.

Adding a crop block isn't the easiest thing to do, since there's a lot of little things that need to be done to bring it to parity with vanilla crop blocks, to name all of them:

There are a couple places in the original implementation that I'm not too proud of, but I'd have to rewrite it in Kotlin anyways, so I don't think much of the scuff will be ported over. A lot of these things we could very easily do away with, for example the second and third list items, being that they're the most complicated and out of scope of popcorn. Additionally, all of this was done without the knowledge that there might be fabric APIs to handle the implementation.

Let me know what you think! If you don't mind all of this being brought over I'd be more than happy to get a PR started.

@Lemmmy
Copy link
Member

Lemmmy commented Jan 15, 2023

Sounds awesome to me.

I think since the terrain is already generated, and villages have already been established, it would be pointless to implement it being found in villages

Yeah, we're avoiding expanding the world for now, but I wouldn't be opposed to adding generator in the event that we ever do (or if we retrogen). This is also the reason sakura saplings etc. are only dungeon/trade loot at the moment - the world was generated long before they were implemented!

for example the second and third list items, being that they're the most complicated and out of scope of popcorn

Totally fine. Composting is trivial (the saplings do it) but the rest we can live without, I think most players will farm them by hand or with CC in our use case!

Additionally, all of this was done without the knowledge that there might be fabric APIs to handle the implementation.

Off the top of my head Fabric has CompostingChanceRegistry now (not sure if our saplings use this yet), and VillagerPlantableRegistry and VillagerInteractionRegistries may also be relevant.

Overall it sounds fantastic, and if you would put together a PR that would be amazing!

@Kan18
Copy link
Contributor

Kan18 commented Jan 20, 2023

Maybe popcorn (or a different item) could also be added into the fishing loot tables.

@Lemmmy Lemmmy assigned Lemmmy and hugeblank and unassigned Lemmmy Jan 20, 2023
@Lemmmy Lemmmy added the enhancement New feature or request label Jan 23, 2023
@umnikos
Copy link

umnikos commented Jun 14, 2023

I'd like to propose design changes/additions to the suggestion:

  1. Instead of smelting corn to pop it, it'd be cooler to throw it into fire. When unpopped corn goes into a flame instead of disappearing it turns into popped corn and launches itself upwards. Then if the player (or turtle) doesn't catch it and it falls back into the fire it disappears for real. The main idea here is for the process to be the same kind of spectacle real popcorn popping has to it (and it can also be quickly done in bulk so that's nice when preparing it on the spot)
  2. The popcorn bag should be an inventory storing up to 3 stacks of popped corn (or more?). When eaten the popcorn should actually count as food but subtract several of the popped corn stored inside it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants