Ender IO Zoo

Ender IO Zoo

961k Downloads

Grinding balls don't work with some blocks with multiple primary output items.

AfterRebelion opened this issue ยท 17 comments

commented

Issue Description:

If you try to SAG Mill some items that in have multiple primary output items per item grinded (Like the Block of Coal), not necessarily secondary outputs, it only gives you the normal amount of items.
As said, it happens with Block of Coal (And if you have a mod that adds it, Charcoal), that has 9 Coal Powder at it normal output, but not with the Obsidian block. that has 4 Obsidian Powder.
There are some items that don't accept Grinding Balls, but JEI tells me that the Block of Coal should.

What happens:

If you grind a Coal block with a Grinding ball, you get the normal amount.

What you expected to happen:

That grinding with the Grinding ball would yield more items, depending on the grinding ball used.

Steps to reproduce:

  1. Get a SAG Mill, and for example put a Melodic Alloy Grinding Ball on the grinding slot (Its easier to test, as it has a x2 primary output).
  2. Put a Block of Coal inside
  3. Wait till it grinds, and you can see that at the output you have 9 Coal Powder, when you should have around 18.
  4. You can test with other items to compare, like with 9 Coal, and see that it gives the specified 18~ amount.
  5. Or with the Obsidian block, and it gives you 8~

Affected Versions (Do not use "latest"):

  • EnderIO: 5.0.36
  • EnderCore: 0.5.41
  • Minecraft: 1.12.2
  • Forge: 1.12.2-14.23.5.2768
  • SpongeForge? no
  • Optifine? no
  • Single Player and/or Server? Singleplayer

Your most recent log file where the issue was present:

https://gist.github.com/AfterRebelion/684a3bfdd9fac0a9176616cd05d9c6b7

commented

This is working as intended, all ingots, blocks, and nuggets are excluded from bonuses. However it might not be properly represented in the JEI plugin.

commented

I should have been more specific. The blacklist looks at the oredictionary name, and obsidian is not "blockObsidian"

commented

But thats not true, as Obsidian is a block, and it correctly duplicates the output.

commented

Well, in that case the problem really is compatibility with JEI, as it doesn't properly represents what items can accept bonuses.
And another problem is that even if it doesn't apply the bonus, it consumes the grinding ball.
Unlike other items/block like the Lapislazuli Block, that doesn't accept bonuses, but doesn't consumes the ball either.

commented

It should not consume the ball. Which items are doing that without providing the bonus

commented

The ones I tested are Block of Coal, and Glowstone. This ones don't give a bonus, but consume the ball.
Since in theory anything that has ingot, nugget or block in its OreDictionary shouldn't give a bonus, one way to test it would be to search in Just Enough Items for items that have that criteria, but appear there as accepting a Grinding Ball.

commented

Glowstone is set to "chance only" if i remeber correctly that means that only the SECONDARY stat and the energy stat are applied from the grinding ball up to a max of 100%. This means with grinding balls you should never get more than 4 glowstone dust from one glowstone.

commented

The issue with the coal block is that the logic to exclude blocks/ingots runs on the actual item that is being processed, not on the recipe.

commented

That still doesn't explain why the Block of Coal consumes the grinding ball, even when it doesn't give a bonus, unlike the rest of items that don't give a bonus. Why is the block of Coal excluded in a different way that other items?

commented

Sorry for double-posting, but it is so easy to see the inconsistency ingame, that I can only assume that nobody tried. So here is a visual ingame example.
https://streamable.com/darw1

Two cases:
Case 1:
Input item: Lapis Lazuli Block, with OreDictionary name "blockLapis"
Output Item: 9x Lapis Lazuli Powder
Doesn't give a bonus, Doesn't consume the ball.

Case 2:
Input item: Block of Coal, with OreDictionary name "blockCoal"
Output Item: 9x Coal Powder
Doesn't give a bonus, Consumes the ball.

The two items are practically IDENTICAL, but they produce different results. Its clearly inconsistent.

commented

So there are two ways in where the mod decides what recives a bonus, a OreRegistry lookup one that checks if it contains certain criteria, and a recipe config one that has a bonus variable. And this two can disagree each other, resulting in two different behaviours? Mmmm...

In any case, whatever the method used to blacklist the use of a bonus, it should result in the same behavour, There should be only two case scenario:

  1. Either it accepts a bonus, and consumes the grinding ball.
  2. Or it doesn't accept a bonus, nor consumes the ball.

Right now, due to a inconsistency in which method is used to blacklist a item/recipe, now there are three posibilities:

  1. An item accepts a bonus, and consumes the grinding ball.
  2. An item doesn't accept the bonus, nor consumes the ball.
  3. An item doesn't accept the bonus, but it consumes the ball.

And having two methods goes all the way to JEI, that due to only reading the recipe, it falsely reports that items that don't accept a bonus, do.

Couldn't the OreDictionary lookup be changed to have the same result as the recipe one, changing it to instead of disabling only the bonus, to not use the grinding ball altogether? That way even through JEI would still falsely report, at least the behaviour is consistent.

commented
  1. never happens.. it still uses the energy stat of the ball if its a block nugget or ingot making the machine faster... its getting a bonus but not a noticable one..

I Agree with this
Couldn't the OreDictionary lookup be changed to have the same result as the recipe one, changing it to instead of disabling only the bonus, to not use the grinding ball altogether? That way even through JEI would still falsely report, at least the behaviour is consistent.

or better yet just remove the hardcoded blacklist and add them to the xml.

Edit: after speaking with the devs they agreed to remove the hardcoded blacklist in favor of the xml blacklist.

commented

Removing the hardcoded blacklist works even better for me, because as a modpack maker, now I could directly edit the xml without thinking "Oh, ****, thats a block, so it wouldn't let me do it".
If there is no gamebreaking reason to keep the blacklist, better let it go.
And now, in my example, 9x Coal and 1x Block of Coal could have the same result, as one would expect.

commented

Yeah, but as you could already do that with the individual coal items, it is exactly the same as before. And if this behaviour is undesirable, its always posible to change that in the recipe xml.

commented

The blacklist was to prevent duping from a certain mod that wont be mentioned here allowing any dust to be smelted back into its ingot or gem form.. so if coal block turns into 9 dust with a bonus of 9 now you have 18 coal...

commented

Blacklist is removed in dev, should be released as part of the next version.