
Farming Station not checking RF before executing action
Robijnvogel opened this issue · 5 comments
Issue Description:
I used the config file to change the harvest cost of the EnderIO Farming Station from 500 RF to 25000 RF, however, the farm seems to be able to harvest even when there's less than 25000 RF in its buffer.
It may be important to note that I created the world before editing the configs.
I also set the passive RF/t consumption to 1 RF/t, because 40 RF/t may be good for a tree farm, but for a crop farm it is way too much. An alternative for turning these down, would be to put a Redstone Clock on the Farm just to save power. Also see #3893 (comment) . Quite naturally, the need for this tweak is unintended.
What happens:
My crop Farming Station receives only a little RF/t. A bit less than it should need to function efficiently. As such, it can typically not accumulate 25000 RF before a crop (melon) can be harvested.
However, it still does harvest the melon (almost?) every time. This action will consume all the RF in the buffer if it was less than 25000 RF.
I assume that EnderIO is only checking for the default 500 RF to be available, perhaps because it is saved with the world upon creation, instead of the configured amount, but I have not investigated this.
What you expected to happen:
I expected the buffer to increase up to 25000 RF before the farm tries to harvest anything and then decrease by 25000 per operation.
Steps to reproduce:
- Change the configs.
- Give the Farming Station a little power.
- Put a few full-grown crops around it.
- Observe
Affected Versions (Do not use "latest"):
- EnderIO: 2.3.0.429_beta and latest (2017-06-22)
- EnderCore: 0.2.0.39_beta and latest (2017-06-22)
- Minecraft: 1.7.10 and 1.10.2 (I assume all versions in between as well)
- Forge: 1614 and 2221
@HenryLoenwind I just downloaded the latest EnderIO (and EnderCore) version for MC 1.12 less than an hour ago and I have confirmed that this issue persists.
I have established that the Farming Station uses 100 µI per scan action (this does not seem to be configurable) and I configured the harvest action to be 1000 "energy".
So I filled up a Farming Station with +- 52000 µI, I turned it on and it harvested 44-46 crops, which, including the scan should cost +- 1100 * 45 = 49500 µI, which, by the crudeness of my experiment, is close enough.
BUT
After this, I let it run on an energy input of 1 µI/t and every time the internal energy buffer reached 100 µI, it harvested the crop and consumed just 100 µI. In most cases it also replanted the crop.
Note: To reproduce this bug in MC 1.12, you need to let the Farming Station harvest at least one crop after game start by giving it enough energy to legitimately do so. Before you do this, the Farming Station will scan a crop, consume 100 µI and move on to the next crop without harvesting it, effectively only wasting energy. This is more-or-less equivalent to what I described in #3893 .
Note 2: The same is true for the "working the land an planting" operation, however I think that that is handled exactly the same energy-usage-wise in code, so that's not surprising.
@HenryLoenwind You could of course add the 1.7 label, but I just downloaded the latest EnderIO version for MC 1.10.2 and this version has the exact same problem.
As a result, a farming station with a passive RF consumption of 100 RF/t works at maximum efficiency while receiving 101 RF/t.
- EDIT: By empirical observation I have discovered that the Farming Station needs 100 RF (not the configured value) before taking an action. As a result, 101 RF/t is not maximum efficiency, but 105 RF/t is. (A negligible difference.)
The config options affect what energy the Farming Station will try to consume per action, but not what it energy it needs to start working.
@HenryLoenwind, could you please change the label on this issue so that you might not miss it in while fixing the 1.10+ issues?