MatrexsVigil / harvestcraft

All rights reserved - None of my artwork is available to be used for FREE in your game EVER. If you want to HIRE ME, please contact me. Thank you. This code is here for people to learn from and to help find bugs ONLY.
https://www.patreon.com/pamsmods
89 stars 85 forks source link

harvescraft 1.12.2 spamming log with fruit tree gen disabled causing lag and ai freezing (starts at line 80560) #431

Open DJlasp opened 3 years ago

DJlasp commented 3 years ago

debug.log

coderepo8593 commented 3 years ago

This is the code you are saying is causing lag and ai freezing.

public void generate(Random random, int chunkX, int chunkZ, World world,
                     net.minecraft.world.gen.IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) {
    if (!fruitTreeConfigManager.enableFruitTreeGeneration) {
        HarvestCraft.log.debug("disabled fruit tree generation");
        return;
    }

You might want to reconsider your assumption. The only thing this will do is spam the log file. It causes the function to log output and return instantly. I don't see how this could be causing your performance issues. One way you could test your theory out would be to recompile without the logging line and see what happens. I think you would still get slow performance because it is being caused by something else.

Do you have fruit tree generation disabled? I would assume yes since that is the only way this message would be logged.

SigynLaufeyson commented 3 years ago

I'm having the exact same issue but fruit tree generation has NOT been disabled. Fruit trees are still appearing normally. I am running Dynamic Trees for PHC (just an FYI). I've been playing this world (single player) for months but the problem is recent. I can't figure out what changed since PHC nor Dynamic Trees for PHC have been updated for eons. I tried rolling back to an older version of Dynamic Tress but the problem persists. I can play for about an hour before Java freezes. The debug.log is filled with "[Server thread/DEBUG] [harvestcraft]: disabled fruit tree generation." The errors are logged, per second, ranging from 1 per second to 31 per second.

mmance commented 2 years ago

I don't know about his lag issue, but I have fruit trees disabled and I get that message 10x a second in my log.