* Serialize the complete NBT data to avoid mismatches (#4665) This might increase the network traffic a bit, but the amount of mods actually using the share tag seems to be very limited. For now it is worth the risk as it solves the problem. In case we run into actual issues, there might still be other solutions, which will be way more complex and can potentially introduce additional problems. (cherry picked from commite90dd2f9c6) (cherry picked from commitab393b0ed1) * Fixes #4669: Take NBT into account for comparing. (#4675) This only covers combining different items together. Fuzzy filtering is still a bit too fuzzy for corner cases. Co-authored-by: yueh <yueh@users.noreply.github.com>
This commit is contained in:
@@ -29,6 +29,7 @@ import net.minecraft.nbt.CompoundNBT;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
|
||||
final class AESharedItemStack implements Comparable<AESharedItemStack> {
|
||||
|
||||
private final ItemStack itemStack;
|
||||
private final int itemId;
|
||||
private final int itemDamage;
|
||||
@@ -97,7 +98,8 @@ final class AESharedItemStack implements Comparable<AESharedItemStack> {
|
||||
return damageValue;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return System.identityHashCode(this.getDefinition().getTag())
|
||||
- System.identityHashCode(b.getDefinition().getTag());
|
||||
}
|
||||
|
||||
private int makeHashCode() {
|
||||
@@ -183,4 +185,5 @@ final class AESharedItemStack implements Comparable<AESharedItemStack> {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user