Mystical Agriculture

Mystical Agriculture

86M Downloads

Mystical Agriculture Watering Cans do not work in the Cyclic Item User block

jack-flash opened this issue ยท 5 comments

commented

When you insert a watering can into the cyclic:user (Item User) block it does not water as expected. The problem is in the above code which needs to be changed to:

        } else if (!(player instanceof FakePlayer)){

as it is not properly checking if a fake payer is generating the right click event or not and then the watering code block never gets executed. I tested locally with the above change and it seems to now work as intended, though not sure if there are other unintended consequences with this change.

I will try to submit a code pull for this....

commented

Not to undermine the severity of this issue as I have not played a pack with both cyclic and MA in while. However, maybe 9 months ago I was able to automate this successfully... did you fill the watering can with water..?

commented

I debugged the code and the logic above, while solving the problem, does pose some potential performance issues as it effectively bypasses the cooldown. Without it, the section to water is never actually executed. Please see my pull request here: #475

This is definitely after filling the watering can. :) PickleTweaks' watering can is also affected by this glitch. The watering can there is also now functional with the change in my pull request.

commented

Well, to be fair, I think it gets executed once, but then because there is no countdown in the cooldown item timer, it gets stuck and never executed again. I think the correct way to solve this would be to get the Cooldown properly managed by the Server Tick(), but it seems there is no clean solution from the Forge team. There was a discussion with some of them about putting together a proper document on the use of FakePlayer, which would provide guidance for matters such as these.

commented

See this issue posted here. Lothrazar/Cyclic#2004

commented

Just tested and this seems to be working.