Unique Crops

Unique Crops

7M Downloads

Will an Abstract ever spawn?

krwminer opened this issue ยท 6 comments

commented

The only place I see that Abstract can be created is through onPlayerTick(), is that right?

If so, (which I might have missed something), then I think that it will never be created.
On line 469 of UCEventHandlerServer.java it returns if there was no key for TAG_ABSTRACT.
Shouldn't that be the reverse, return if there was was a key for TAG_ABSTRACT?

commented

Yes, that should be correct. During my initial testings, the abstract seed spawned in my inventory just a little too quickly, so I believe the only thing I changed in the code after that was increasing the amount of time and randomness to it.

Since I always second guess myself on stuff like this, I'll take another look into it. Thanks for the heads up :]

commented

I just do not see how the TAG_ABSTRACT is set without planting an Abstract seed. There is a 1 in 1000 chance it is even possible to generate an Abstract, but it immediately returns from the Tick if there was no tag found before it gets to your next 1 in 100 chance. Is it possible you planted a seed before you tested this? Or am I just plain missing something big here? Thanks for looking into it. :)

commented

Ok, having taken a look at it, this definitely gets set when you plant an abstract seed. I tweaked the code while I was in there since some of it looked odd to me, but after testing it, it all should work.

commented

OK, I will bite then... How do you go about getting an abstract seed?

commented

if you mean making one seed, you can craft it using the seed crafting recipe.

if you mean getting the crop it gives, just planting one will mean that at some point it will randomly give an abstract residue, plus a chance of giving an extra later on before considering it fully "harvested", requiring a replanting.

commented

Wow. I can't believe how I missed that. The minecraft crafting recipe came up by default so I missed the seed crafting recipe. D'oh! Thank you for being patient with me. I love your mod!