henkelmax / easy-villagers

Never get annoyed by villagers again!
59 stars 25 forks source link

Farmer block does not support non-vanilla #133

Closed shanoaice closed 1 year ago

shanoaice commented 1 year ago

Bug description

Right-clicking the Farmer block with non-vanilla crops will open the GUI instead of planting them in the block.

Steps to reproduce the issue

  1. Pick a seed from other mods, such as Flax Seed from Thermal Cultivation.
  2. Right click the Farmer block.
  3. The output GUI of Farmer block opens.

Expected behavior

The crop (seed) should be planed in the Farmer block.

Versions

Other mods

Extra Information

I am not sure whether detection of a valid seed in FarmerTileentity is proper. It seems like that in Thermal Cultivation Plant.CROP is properly set, but my searching technique is not good enough to determine whether the corresponding seed item is an instance of IPlantable. (but I think it should be. I have no idea why this doesn't work.)

henkelmax commented 1 year ago

The block will only accept seeds that villagers can plant and farm.

shanoaice commented 1 year ago

The block will only accept seeds that villagers can plant and farm.

Yes, but according to this code everything that is an instance of IPlantable and has a type of PlantType.CROP should be harvestable by a villager.

henkelmax commented 1 year ago

Thats true:

https://github.com/henkelmax/easy-villagers/blob/master/src/main/java/de/maxhenkel/easyvillagers/blocks/tileentity/FarmerTileentity.java#L98-L103

shanoaice commented 1 year ago

Then I am puzzled why I can't plant seeds added by Thermal Cultivation into the Farmer block. I will try look into their code further. Thanks!