Tropicraft

Tropicraft

9M Downloads

Palm Trees causing Redstone to lag

Bradley19964 opened this issue ยท 2 comments

commented

When placing a lot of palm trees it makes opening doors, malisis mod, telepad mod, and animals lag or just not work. After deleting most of the palm trees it fixes it.

commented

I had some lag and even crash issues with palm trees when testing Tropicraft (MC1.12.2/Forge14.23.4.2705/Tropicraft7.1.4.78) and I noticed that I can place a palm leaf in the world, or place a palm log in the world, but when I place them together, a coconut randomly spawns on the log. I don't know enough about Java to look into the code, but I remember a problem with Railcraft blocks where people used blocks from a multiblock as decorations that weren't structures, but the blocks were lagging worlds because they were constantly checking around them to see if they were a valid structure. This may be the same thing with palm trees trying to see if they meet the requirements for a coconut to appear?

Mods like Pam's Harvestcraft generate fruit nubs when the tree grows that have to mature to be harvested, then leave the nub and drop a fruit when harvested. IC2 Rubber trees (used to?) have a few spots, specific to each new rubber tree you grow, where rubber spawns which appear to be some invisible version of what Pam's does. Vanilla cocoa beans just grow on the side of a jungle log. Maybe there is some code in vanilla or one of these mods that would inspire a less laggy way to get coconuts from palm trees?

commented

Palm logs do spawn coconuts randomly but this should not have a significant impact on performance. It's done with random ticks in the same way crops grow, or snow melts, etc. Unless you can provide a profiler/sampler report showing that this is the problem, I can't place the blame there.