Placing Gene Sample in crafting table with similar Honey Treat modifies the Sample (even though no crafting occurs)
mc-ganduron opened this issue ยท 2 comments
productivebees-1.16.5-0.6.9.14
There's a problem adding a gene sample to a honey treat that has that type of sample already on it. If the crafting is canceled, the sample is modified.
Steps to reproduce:
- Create a honey treat.
- Apply a gene sample to the honey treat.
- Place that honey treat back in the crafting table with another gene sample, the same type that was applied in step 2.
- Cursor over the expected output honey treat.
- Pull out the original, input honey treat and sample (i.e., don't perform the crafting).
In step 4, the output honey treat shows the wrong gene sample percent. It doesn't add the value of the sample.
After step 5, the sample is modified. It has the original sample percent plus the honey treat sample percent. (This is the value that should have appeared in step 4.)
Video:
ProductiveBees_GeneSample.mp4
The problem may be in HoneyTreat.addGene
. It is adding the purity value to the incoming gene, not to the HoneyTreat's existing gene (line 61 below):
Changing line 61's gene
to insertedGene
appears to fix the problem (although this video is the full extent of testing I've done):