User blog:LOTRMod/Farming problems

Hello everyone,

Today I have come to ask for advice on a problem with farming units. I will keep this simple and specific; please don't take this as an opportunity to suggest more farming units, or new AI to allow them to farm other crop types. That will come, in time.

So now that's out the way. The problem I noticed concerns melon and pumpkin farming.

I was sure that these crops could grow their fruit on top of any random block. I remember it being that way in the past. Indeed, some of the mod's structures are even designed that way. But no! Looking at the code, and the MC wiki, it turns out they can only grow fruit blocks in spaces on top of grass, dirt, or farmland.

Now this is a problem for the hired farmers, who will pitilessly hoe all dirt/grass near water and plant the stems there, meaning they will leave no un-planted ground on which for melons and pumpkin blocks to actually grow.

Obviously, this needs to be fixed.

One way I could go about this would be to force the farmers to only hoe ground in a certain pattern if they're given pumpkin or melon seeds, a pattern which would leave space for fruit to grow. But this would be unsatisfactory, restrictive, and not obvious in how it works.

The second way would be to add some way to indicate to farmers that a certain patch of ground is not to be hoed under any circumstances. This seems to me to be by far the better option, as it is easy to control, allows flexibility in building farms for farmers, and - importantly - could also be used with any other crops beside melons and pumpkins, to allow players to work with the farmers more easily.

I am sure you will all agree the second option is better. So, how to implement it?

Some obscure and complex thing could be done with a GUI and marking tiles on an on-screen grid, but this would be a downright pain to code and confusing to use.

It seems that a better method would be by physically altering the world. For example: any grass/dirt blocks with sand directly underneath will not be hoed.

If you have any ideas, please do now go ahead and suggest them! Remember, the simpler the idea is - for players to understand, and for me to add - the better.

Note that I can't easily (or even relatively easily) add any new functionality to grass, dirt, and farmland blocks, or give them any new 'metadata', so the suggestion needs to be something external to the actual blocks. I.e. not 'right click the block with a golden hoe to change it to a new Unhoeable Grass block' or anything like that.