structure gen crashes the game

Works as designed
Issue description

I have made a minecraft mod that adds trees to the game.
to make the trees generate i used the procedure on generate for structures, and the trees generate fine, but the game locks up soon after. the console will say things like
"[Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 87707ms or 1754 ticks behind" 
the screen turns gray and JavaTM SE binary has stopped working.
about 5 whole minutes after the game locks up it finally crashes and outputs this report.

-on some digging on my own I figured out it had something to do with leaves decaying-

---- Minecraft Crash Report ----
// Don't be sad, have a hug! <3

Time: 09/05/20 15:23
Description: Exception while ticking

java.lang.OutOfMemoryError: GC overhead limit exceeded
    at net.mcreator.ridiculous_forests.procedures.LeavesdecayProcedure.executeProcedure( ~[?:?] {re:classloading}
    at net.mcreator.ridiculous_forests.block.KardarioleavesBlock$CustomBlock.tick( ~[?:?] {re:classloading}
    at net.minecraft.block.BlockState.tick( ~[?:?] {re:classloading}
    at ~[?:?] {re:classloading}
    at$$Lambda$3965/2076824876.accept(Unknown Source) ~[?:?] {}
    at ~[?:?] {re:classloading}
    at ~[?:?] {re:classloading}
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities( ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.tick( ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.integrated.IntegratedServer.tick( ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
    at [?:?] {re:classloading,pl:accesstransformer:B}
    at [?:1.8.0_252] {}

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head --
Thread: Server thread
    at net.mcreator.ridiculous_forests.procedures.LeavesdecayProcedure.executeProcedure(
    at net.mcreator.ridiculous_forests.block.KardarioleavesBlock$CustomBlock.tick(
    at net.minecraft.block.BlockState.tick(
    at$$Lambda$3965/2076824876.accept(Unknown Source)

-- Block being ticked --
    Block location: World: (25,74,-173), Chunk: (at 9,4,3 in 1,-11; contains blocks 16,0,-176 to 31,255,-161), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)

-- Affected level --
    All players: 1 total; [ServerPlayerEntity['Dev'/1374, l='kardario gen crash', x=217.67, y=78.37, z=-232.59]]
    Chunk stats: ServerChunkCache: 2612
    Level dimension: DimensionType{minecraft:overworld}
    Level name: kardario gen crash test
    Level seed: -6752139702061834697
    Level generator: ID 00 - default, ver 1. Features enabled: true
    Level generator options: {}
    Level spawn location: World: (208,71,-224), Chunk: (at 0,4,0 in 13,-14; contains blocks 208,0,-224 to 223,255,-209), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    Level time: 633 game time, 633 day time
    Known server brands: forge
    Level was modded: true
    Level storage version: 0x04ABD - Anvil
    Level weather: Rain time: 74334 (now: false), thunder time: 63568 (now: false)
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(
    at net.minecraft.server.MinecraftServer.tick(
    at net.minecraft.server.integrated.IntegratedServer.tick(

-- System Details --
    Minecraft Version: 1.15.2
    Minecraft Version ID: 1.15.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_252, BellSoft
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), BellSoft
    Memory: 477117928 bytes (455 MB) / 3782737920 bytes (3607 MB) up to 3782737920 bytes (3607 MB)
    CPUs: 12
    JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
    ModLauncher: 5.1.0+69+master.79f13f7
    ModLauncher launch target: fmluserdevclient
    ModLauncher naming: mcp
    ModLauncher services: 
        /eventbus-2.1.0-service.jar eventbus PLUGINSERVICE 
        /forge-1.15.2-31.1.63_mapped_snapshot_20200225-1.15.1-launcher.jar object_holder_definalize PLUGINSERVICE 
        /forge-1.15.2-31.1.63_mapped_snapshot_20200225-1.15.1-launcher.jar runtime_enum_extender PLUGINSERVICE 
        /accesstransformers-2.1.1-shadowed.jar accesstransformer PLUGINSERVICE 
        /forge-1.15.2-31.1.63_mapped_snapshot_20200225-1.15.1-launcher.jar capability_inject_definalize PLUGINSERVICE 
        /forge-1.15.2-31.1.63_mapped_snapshot_20200225-1.15.1-launcher.jar runtimedistcleaner PLUGINSERVICE 
        /forge-1.15.2-31.1.63_mapped_snapshot_20200225-1.15.1-launcher.jar fml TRANSFORMATIONSERVICE 
    FML: 31.1
    Forge: net.minecraftforge:31.1.63
    FML Language Providers: 
    Mod List: 
        client-extra.jar Minecraft {minecraft@1.15.2 DONE}
        forge-1.15.2-31.1.63_mapped_snapshot_20200225-1.15.1-recomp.jar Forge {forge@31.1.63 DONE}
        main Ridiculous forests {ridiculous_forests@1.0.0 DONE}
    Player Count: 1 / 8; [ServerPlayerEntity['Dev'/1374, l='kardario gen crash', x=217.67, y=78.37, z=-232.59]]
    Data Packs: vanilla, mod:forge (incompatible), mod:ridiculous_forests
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'forge'

-note this exact thing still happens in forge 1.15.2 in EAP 2020.3 b18613.-

Attachment Size
crashreport.zip2.03 KB 2.03 KB

Issue comments

Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.