Stormwind99 / FoodFunk

Minecraft mod: What is that funky smell in my backpack? Food spoils over time unless preserved. Configure any item to rot, any container to preserve items.
https://minecraft.curseforge.com/projects/food-funk
GNU Lesser General Public License v3.0
10 stars 8 forks source link

Plantable food can be refreshed by planting the item then re-harvesting #29

Closed Stormwind99 closed 6 years ago

Stormwind99 commented 6 years ago

Describe the bug Plantable food can be refreshed by planting the item then re-harvesting it. Carrots and potatoes, for example.

To Reproduce

  1. Get a plantable food item like carrots or potatoes
  2. Let it rot at least 1% of time
  3. Plant the food item
  4. Harvest the food item. It will have a fresh rot expiration.

Expected behavior Not exactly sure. Immediate refreshing is bad, but also want results of grown crops to be at 0% rot when harvested. One idea would be for the planted crop to behave like a refreshing container - it would tick down its rot back to 0% at the same speed it would rot, and restart rotting when harvested.

However, MC vanilla crops also don't have TileEntities nor NBT to attach the Rot capability and/or data. Such an implementation might require creating TileEntites for all crops and adding custom classes and/or override vanilla instances for every part of the crop's lifecycle: ItemSeedFood (to place new BlockCrop), BlockCrop (to add TileEntity), TileEntity (to hold cap).

Stormwind99 commented 6 years ago

Fixed in https://github.com/Stormwind99/FoodFunk/commit/7fa933f4bae91e027fa102fd5396eb201726fb8c