Krutoy242 / Enigmatica2Expert-Extended

Addon for modpack Enigmatica 2: Expert
https://www.curseforge.com/minecraft/modpacks/enigmatica-2-expert-extended
76 stars 51 forks source link

Rats is half compatible with Fruit Trees #411

Open ReiDaTecnologia opened 2 months ago

ReiDaTecnologia commented 2 months ago

Description

Rats can bone meal them but can't collect them. Affect vanilla cocoa beans, all pam trees and Forestry's date and payaya (The other fruit trees from Forestry also don't work but as the fruits are in the leaves and they still drop fruits when chopped down, they aren't that bad). To Reproduce

Steps to reproduce the behavior:

  1. Get any of the tree mentioned above
  2. Get a tamed rat to the tree (if you plant the tree's sapling near a tamed rat, it will instead break the sapling and if you grow the tree before he can do that, it will just stay/walk toward the previous location of the sapling until something else overwrite that previous command)
  3. See the Rat not collecting the tree's fruit even if it is fully growth

Modpack version v1.43.0

debug.log or Crash report

This is the debug.log of a session of me testing all Pam trees, Forestry and cocoa beans. I had to do some pauses for several reasons so it explains the time skip of it. debug.zip

Krutoy242 commented 2 months ago

Thank you for the explanation. I will take a look what I can do.

ReiDaTecnologia commented 2 months ago

After checking Rats: RatN Edition and Pam's source code (with my basic knowledge of programming), i think it is because Pam fruit blocks don't have "BlockCrops", "BlockBush" and blocks with the set Material "GOURD" which Rats is looking for.

ReiDaTecnologia commented 4 days ago

After months of work, i was able to improve the harvesting feature of rats mod. As i learned recently that you can't just upload the modified jar to curseforge, people who want to have it, can just download from the fork's release page. Any bug report and suggestions of improving the code or the harvesting feature is welcomed.

Krutoy242 commented 4 days ago

Can you propose this changes to Rats:ROTN fork? Maybe they can just merge your PR? Your improvements looks very fitting.

ReiDaTecnologia commented 4 days ago

Sure but i prefer to test it in a real player environment (like in my world) first.

Krutoy242 commented 4 days ago

Maybe, instead if making a separate mod, we could just make ZenScript mixin? This will make it easy to maintain and improve, since doesnt require things like dev environment, compilation and stuff like that. Also its easy to distribute.

ReiDaTecnologia commented 4 days ago

Well if you are willing to do that, i wish you good luck!

Krutoy242 commented 4 days ago

Yes, I will try. Only thing that buzzed me is by the first look on your code its kinda junky. Too much code repetitions, overload of static strings, unperformant calls, and so on.

ReiDaTecnologia commented 4 days ago

Yeah, i'm new to modding and not a god-like programmer (like who made Forestry's, that code is crazy!). At least it works i guess... It was more of a personal work so i can use the rats to farm in my planned base's food farm area.