emilyploszaj / emi

A featureful and accessible item and recipe viewer
MIT License
220 stars 46 forks source link

GregTech tools counted too many times #477

Closed steph-lion closed 3 months ago

steph-lion commented 3 months ago

GT tools come with a durability, as vanilla tools. The problem is, when used as a crafting material, they get counted as N, where N is the output items you want. In the screenshot: 3x hammers, 3x wire cutters.

I think it should be always considered as 1.

Example: image

emilyploszaj commented 3 months ago

This is a bug with gregtech not specifying their ingredients as having remainders.

screret commented 3 months ago

I am fairly certain we do specify the items as having remainders.

screret commented 3 months ago

right here, in fact. for all tool types.

emilyploszaj commented 3 months ago

EMI has a concept for remainders on EmiStacks used in the inputs and outputs of recipes. By default, remainders are obtained for normal crafting recipes using the vanilla remainder system by assembling items in a crafting grid and calling the method, but any complex recipes or complex hooks (This seems to have access to a player during some hook?) EMI cannot provide cannot be done automatically. Your hooks do not interact with the actual recipe system so there is no way for EMI to be able to detect this.

screret commented 3 months ago

EMI has a concept for remainders on EmiStacks used in the inputs and outputs of recipes. By default, remainders are obtained for normal crafting recipes using the vanilla remainder system by assembling items in a crafting grid and calling the method, but any complex recipes or complex hooks (This seems to have access to a player during some hook?) EMI cannot provide cannot be done automatically. Your hooks do not interact with the actual recipe system so there is no way for EMI to be able to detect this.

the player hook is only used for damaging the item, it'll return the stack anyway. anyway, how should these be registered to EMI as damageable in some way?

emilyploszaj commented 3 months ago

In a recipe, remainders are defined using EmiStack.setRemainder