Simplify acquisition of grains of infinity. #740

Merged
Rover656 merged 7 commits from feat/simpler-grains into dev/1.21 2024-07-18 21:29:49 +00:00
Rover656 commented 2024-07-15 22:05:20 +00:00 (Migrated from github.com)

Description

We've been discussing this a lot internally and had a good amount of feedback expressing frustration with the current means of acquiring grains of infinity (and coal dust). As such, this PR trivializes the process.

  1. The manual crushing of deepslate and coal has been removed.
  2. Dark Steel can now be crafted with 2 coal in place of 1 coal dust (coal dust option is still available) - this has already been merged
  3. Grains of infinity can now be acquired by burning deepslate, this has a 35% chance to drop one grain for each block set on fire. This is intended as an early means of production - as well as deter users from using deepslate fire as automation.
  4. Bedrock fire will now produce grains at an 80% rate, producing between 1-3 grains. This incentivizes a trip down to Y-32 and is a prime candidate for automation (especially once fire water is re-implemented).
  5. A new SAG Mill recipe has been added for cobbled deepslate, turning it into cobblestone and a byproduct of grains of infinity at 30% chance (grinding ball modifiable). This is an alternative way to automate grains, fed by something like a quarry.

(In addition, the cobblestone recipe has been split into a normal cobblestone recipe, and a mossy variant that has a chance to produce a vine as a byproduct - this recipe is up for change still)

image
image

Breaking Changes

This changes the early game of Ender IO - but nothing that can be considered "breaking" as far as code goes.

Checklist

  • My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you).
  • I have made corresponding changes to the documentation.
  • My changes are ready for review from a contributor.
# Description We've been discussing this a lot internally and had a good amount of feedback expressing frustration with the current means of acquiring grains of infinity (and coal dust). As such, this PR trivializes the process. 1. The manual crushing of deepslate and coal has been removed. 2. Dark Steel can now be crafted with 2 coal in place of 1 coal dust (coal dust option is still available) - this has already been merged 3. Grains of infinity can now be acquired by burning deepslate, this has a 35% chance to drop one grain for each block set on fire. This is intended as an early means of production - as well as deter users from using deepslate fire as automation. 4. Bedrock fire will now produce grains at an 80% rate, producing between 1-3 grains. This incentivizes a trip down to Y-32 and is a prime candidate for automation (especially once fire water is re-implemented). 5. A new SAG Mill recipe has been added for cobbled deepslate, turning it into cobblestone and a byproduct of grains of infinity at 30% chance (grinding ball modifiable). This is an alternative way to automate grains, fed by something like a quarry. (In addition, the cobblestone recipe has been split into a normal cobblestone recipe, and a mossy variant that has a chance to produce a vine as a byproduct - this recipe is up for change still) ![image](https://github.com/user-attachments/assets/786c1554-98f5-4276-9730-d0bd6affc5fc) ![image](https://github.com/user-attachments/assets/785f218e-0cf1-4acd-987a-6680e26cb08f) # Breaking Changes This changes the early game of Ender IO - but nothing that can be considered "breaking" as far as code goes. <!-- For drafts, fill this in as you go; if you are leaving draft, make sure these are all complete. --> # Checklist - [x] My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you). - [x] I have made corresponding changes to the documentation. - [x] My changes are ready for review from a contributor. <!-- Thanks to: https://embeddedartistry.com/blog/2017/08/04/a-github-pull-request-template-for-your-projects/ for the building blocks of this template -->
ferriarnus (Migrated from github.com) reviewed 2024-07-15 22:05:20 +00:00
HenryLoenwind commented 2024-07-16 16:17:16 +00:00 (Migrated from github.com)

30% for the SAG mill recipe feels a bit high. Deep slate isn't exactly rare, and throwing a stack or ten in to get more grains than you could ever use is so easy it invalidates any other method.

It's a bit evil, but assuming eio machines still capture their owner, the SAG mill could count how often a player has executed that recipe and use that to reduce the chance. Reducing the change by 33% (relative) for every 5 grains produced (0-4 30%, 5-9 20%, 10-14 14%, 15-20 9%, ...) could work.

Also, as blocks of deep slate are not infinite (indestructible), firecrafting should destroy them. (Or at least turn them into their cobble version, to prevent firemining. Mmmh, firemining could be interesting...maybe have a chance to mine the block with a chance to drop grains when the fire is extinguished by water? This is as close to real-life firemining as I can think of.)

30% for the SAG mill recipe feels a bit high. Deep slate isn't exactly rare, and throwing a stack or ten in to get more grains than you could ever use is so easy it invalidates any other method. It's a bit evil, but assuming eio machines still capture their owner, the SAG mill could count how often a player has executed that recipe and use that to reduce the chance. Reducing the change by 33% (relative) for every 5 grains produced (0-4 30%, 5-9 20%, 10-14 14%, 15-20 9%, ...) could work. Also, as blocks of deep slate are not infinite (indestructible), firecrafting should destroy them. (Or at least turn them into their cobble version, to prevent firemining. Mmmh, firemining could be interesting...maybe have a chance to mine the block with a chance to drop grains when the fire is extinguished by water? This is as close to real-life firemining as I can think of.)
Rover656 commented 2024-07-16 17:36:04 +00:00 (Migrated from github.com)

30% for the SAG mill recipe feels a bit high. Deep slate isn't exactly rare, and throwing a stack or ten in to get more grains than you could ever use is so easy it invalidates any other method.

Yeah that is fair, I'll look to reduce it to something likely in the ballpark of 5-15%. I don't think the reduction by player is something I'd be keen to explore.

Also, as blocks of deep slate are not infinite (indestructible), firecrafting should destroy them. (Or at least turn them into their cobble version, to prevent firemining. Mmmh, firemining could be interesting...maybe have a chance to mine the block with a chance to drop grains when the fire is extinguished by water? This is as close to real-life firemining as I can think of.)

This is a great idea, I think transforming it into standard cobblestone afterwards provides consistency with the SAG Mill recipe grinding the void out of the stone. Firemining also sounds like a cool idea - but I'd probably defer that to another issue/PR for future evaluation :)

Thanks for the feedback!

> 30% for the SAG mill recipe feels a bit high. Deep slate isn't exactly rare, and throwing a stack or ten in to get more grains than you could ever use is so easy it invalidates any other method. Yeah that is fair, I'll look to reduce it to something likely in the ballpark of 5-15%. I don't think the reduction by player is something I'd be keen to explore. > Also, as blocks of deep slate are not infinite (indestructible), firecrafting should destroy them. (Or at least turn them into their cobble version, to prevent firemining. Mmmh, firemining could be interesting...maybe have a chance to mine the block with a chance to drop grains when the fire is extinguished by water? This is as close to real-life firemining as I can think of.) This is a great idea, I think transforming it into standard cobblestone afterwards provides consistency with the SAG Mill recipe grinding the void out of the stone. Firemining also sounds like a cool idea - but I'd probably defer that to another issue/PR for future evaluation :) Thanks for the feedback!
Rover656 commented 2024-07-17 22:46:07 +00:00 (Migrated from github.com)

The chance of obtaining grains of infinity from sag milling is lowered from 30% to 12% and burning deepslate will now convert the block below the fire to cobblestone afterwards.

We'll need a better way to show this in JEI, but I think in the interests of playtesting this - we can leave that for now.

The chance of obtaining grains of infinity from sag milling is lowered from 30% to 12% and burning deepslate will now convert the block below the fire to cobblestone afterwards. We'll need a better way to show this in JEI, but I think in the interests of playtesting this - we can leave that for now.
HenryLoenwind commented 2024-07-18 01:16:04 +00:00 (Migrated from github.com)

This is unrelated to the PR, but for simplicity's sake:

I just had a look at the handler out of curiosity, and it looks a bit wasteful. (Also very much as I remember it, so this probably is my fault.)

I'd suggest a couple of changes:

  • Put 65f3b09b23/enderio-base/src/main/java/com/enderio/base/common/handler/FireCraftingHandler.java (L70-L88) into a getMatchingRecipe() method
  • Put if (getMatchingRecipe() != null) { ...} return; inside if (isFire) {
  • Surround spawnInfinityDrops(...) with a if (getMatchingRecipe() instanceof FireCraftingRecipe matchingRecipe) { (or if ((FireCraftingRecipe matchingRecipe = getMatchingRecipe()) != null) {)
  • Move the // Grab useful fields. stuff inside the two if blocks just above where it's needed. Sadly this means duplicating it, but this is not an event to be picky---NeighborNotifyEvents are fired very often.
  • I think the if (FIRE_TRACKER.isEmpty() && !isFire) { now has no benefit anymore.

And then ignore the complicated description above and look at what I cobbled up in a text editor: https://gist.github.com/HenryLoenwind/e276c7f437120011f1c84175496c531d

I think this would greatly reduce the time spent in this event handler.

This is unrelated to the PR, but for simplicity's sake: I just had a look at the handler out of curiosity, and it looks a bit wasteful. (Also very much as I remember it, so this probably is my fault.) I'd suggest a couple of changes: - Put https://github.com/Team-EnderIO/EnderIO/blob/65f3b09b23cb805049cf24b5016936ee06764319/enderio-base/src/main/java/com/enderio/base/common/handler/FireCraftingHandler.java#L70-L88 into a getMatchingRecipe() method - Put `if (getMatchingRecipe() != null) { ...} return;` inside `if (isFire) {` - Surround `spawnInfinityDrops(...)` with a `if (getMatchingRecipe() instanceof FireCraftingRecipe matchingRecipe) {` (or `if ((FireCraftingRecipe matchingRecipe = getMatchingRecipe()) != null) {`) - Move the `// Grab useful fields.` stuff inside the two if blocks just above where it's needed. Sadly this means duplicating it, but this is not an event to be picky---NeighborNotifyEvents are fired very often. - I think the `if (FIRE_TRACKER.isEmpty() && !isFire) {` now has no benefit anymore. And then ignore the complicated description above and look at what I cobbled up in a text editor: https://gist.github.com/HenryLoenwind/e276c7f437120011f1c84175496c531d I think this would greatly reduce the time spent in this event handler.
Rover656 commented 2024-07-18 21:27:46 +00:00 (Migrated from github.com)

This is unrelated to the PR, but for simplicity's sake:

I just had a look at the handler out of curiosity, and it looks a bit wasteful. (Also very much as I remember it, so this probably is my fault.)

I'd suggest a couple of changes:

* Put https://github.com/Team-EnderIO/EnderIO/blob/65f3b09b23cb805049cf24b5016936ee06764319/enderio-base/src/main/java/com/enderio/base/common/handler/FireCraftingHandler.java#L70-L88
   into a getMatchingRecipe() method

* Put `if (getMatchingRecipe() != null) { ...} return;` inside `if (isFire) {`

* Surround `spawnInfinityDrops(...)` with a `if (getMatchingRecipe() instanceof FireCraftingRecipe matchingRecipe) {` (or `if ((FireCraftingRecipe matchingRecipe = getMatchingRecipe()) != null) {`)

* Move the `// Grab useful fields.` stuff inside the two if blocks just above where it's needed. Sadly this means duplicating it, but this is not an event to be picky---NeighborNotifyEvents are fired very often.

* I think the `if (FIRE_TRACKER.isEmpty() && !isFire) {` now has no benefit anymore.

And then ignore the complicated description above and look at what I cobbled up in a text editor: https://gist.github.com/HenryLoenwind/e276c7f437120011f1c84175496c531d

I think this would greatly reduce the time spent in this event handler.

Yeah I was thinking that when I was looking at the file again - I think I'll log this as an issue and we can handle this down the line. Thanks again!

> This is unrelated to the PR, but for simplicity's sake: > > I just had a look at the handler out of curiosity, and it looks a bit wasteful. (Also very much as I remember it, so this probably is my fault.) > > I'd suggest a couple of changes: > > * Put https://github.com/Team-EnderIO/EnderIO/blob/65f3b09b23cb805049cf24b5016936ee06764319/enderio-base/src/main/java/com/enderio/base/common/handler/FireCraftingHandler.java#L70-L88 > into a getMatchingRecipe() method > > * Put `if (getMatchingRecipe() != null) { ...} return;` inside `if (isFire) {` > > * Surround `spawnInfinityDrops(...)` with a `if (getMatchingRecipe() instanceof FireCraftingRecipe matchingRecipe) {` (or `if ((FireCraftingRecipe matchingRecipe = getMatchingRecipe()) != null) {`) > > * Move the `// Grab useful fields.` stuff inside the two if blocks just above where it's needed. Sadly this means duplicating it, but this is not an event to be picky---NeighborNotifyEvents are fired very often. > > * I think the `if (FIRE_TRACKER.isEmpty() && !isFire) {` now has no benefit anymore. > > > And then ignore the complicated description above and look at what I cobbled up in a text editor: https://gist.github.com/HenryLoenwind/e276c7f437120011f1c84175496c531d > > I think this would greatly reduce the time spent in this event handler. Yeah I was thinking that when I was looking at the file again - I think I'll log this as an issue and we can handle this down the line. Thanks again!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Team-EnderIO/EnderIO#740
No description provided.