I am trying to create an entity similar to the Area Effect Cloud, but instead of effecting all entities with a potion effect, I want to destroy all vegetation in the area that the cloud covers. My current code crashes on /summon with the Ticking Entity Exception.
Crash Report:
12:51:19.541] [Client thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:printToSYSOUT:106]: ---- Minecraft Crash Report ----
// On the bright side, I bought you a teddy bear!
Time: 10/6/19 12:51 PM
Description: Ticking entity
java.lang.IllegalStateException: stream has already been operated upon or closed
at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:246) ~[?:1.8.0_212] {}
at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:438) ~[?:1.8.0_212] {}
at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:444) ~[?:1.8.0_212] {}
at com.gmail.jayjayjay20162016.bombsaway.NoVegetationCloud.tick(NoVegetationCloud.java:58) ~[?:?] {}
at net.minecraft.world.server.ServerWorld.updateEntity(ServerWorld.java:602) ~[?:?] {}
at net.minecraft.world.World.func_217390_a(World.java:734) ~[?:?] {pl:accesstransformer:B}
at net.minecraft.world.server.ServerWorld.tick(ServerWorld.java:397) ~[?:?] {}
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:864) ~[?:?] {pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:799) ~[?:?] {pl:accesstransformer:B}
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) ~[?:?] {pl:runtimedistcleaner:A}
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:645) ~[?:?] {pl:accesstransformer:B}
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_212] {}
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Client thread
Stacktrace:
at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:246)
at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:438)
at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:444)
at com.gmail.jayjayjay20162016.bombsaway.NoVegetationCloud.tick(NoVegetationCloud.java:58)
at net.minecraft.world.server.ServerWorld.updateEntity(ServerWorld.java:602)
-- Entity being ticked --
Details:
Entity Type: bombsaway:novegetationcloud (com.gmail.jayjayjay20162016.bombsaway.NoVegetationCloud)
Entity ID: 437
Entity Name: entity.bombsaway.novegetationcloud
Entity's Exact location: 225.77, 88.49, -182.44
Entity's Block location: World: (225,88,-183), Chunk: (at 1,5,9 in 14,-12; contains blocks 224,0,-192 to 239,255,-177), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
Entity's Momentum: 0.00, 0.00, 0.00
Entity's Passengers: []
Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
at net.minecraft.world.World.func_217390_a(World.java:734)
at net.minecraft.world.server.ServerWorld.tick(ServerWorld.java:397)
-- Affected level --
Details:
All players: 1 total; [ServerPlayerEntity['Dev'/279, l='New World', x=225.77, y=88.49, z=-182.44]]
Chunk stats: ServerChunkCache: 2202
Level dimension: DimensionType{minecraft:overworld}
Level name: New World
Level seed: -6267428530074600669
Level generator: ID 00 - default, ver 1. Features enabled: true
Level generator options: {}
Level spawn location: World: (176,63,-176), Chunk: (at 0,3,0 in 11,-11; contains blocks 176,0,-176 to 191,255,-161), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
Level time: 2931 game time, 2931 day time
Level storage version: 0x04ABD - Anvil
Level weather: Rain time: 134456 (now: false), thunder time: 166850 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
Stacktrace:
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:864)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:799)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:645)
at java.lang.Thread.run(Thread.java:748)
-- System Details --
Details:
Minecraft Version: 1.14.4
Minecraft Version ID: 1.14.4
Operating System: Mac OS X (x86_64) version 10.14.5
Java Version: 1.8.0_212, AdoptOpenJDK
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), AdoptOpenJDK
Memory: 494582584 bytes (471 MB) / 1089470464 bytes (1039 MB) up to 1908932608 bytes (1820 MB)
CPUs: 4
JVM Flags: 1 total; -Xss1M
FML: New FML!
Loaded coremods (and transformers): Nothing
Player Count: 1 / 8; [ServerPlayerEntity['Dev'/279, l='New World', x=225.77, y=88.49, z=-182.44]]
Data Packs: vanilla, mod:forge, mod:bombsaway
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'forge'
[12:51:19.541] [Client thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:printToSYSOUT:106]: #@!@# Game crashed! Crash report saved to: #@!@# ./crash-reports/crash-2019-10-06_12.51.19-server.txt
[12:51:19.542] [Server thread/ERROR] [minecraft/MinecraftServer]: Exception stopping the server
java.lang.IllegalStateException: Removing entity while ticking!
at net.minecraft.world.server.ServerWorld.removeEntity(ServerWorld.java:1026) ~[?:?] {}
at net.minecraft.world.server.ServerWorld.removePlayer(ServerWorld.java:1047) ~[?:?] {}
at net.minecraft.world.server.ServerWorld.removePlayer(ServerWorld.java:1043) ~[?:?] {}
at net.minecraft.server.management.PlayerList.playerLoggedOut(PlayerList.java:318) ~[?:?] {}
at net.minecraft.network.play.ServerPlayNetHandler.onDisconnect(ServerPlayNetHandler.java:929) ~[?:?] {}
at net.minecraft.network.NetworkManager.handleDisconnection(NetworkManager.java:416) ~[?:?] {}
at net.minecraft.util.concurrent.ThreadTaskExecutor.runImmediately(ThreadTaskExecutor.java:72) ~[?:?] {pl:accesstransformer:B}
at net.minecraft.network.play.ServerPlayNetHandler.disconnect(ServerPlayNetHandler.java:278) ~[?:?] {}
at net.minecraft.server.management.PlayerList.removeAllPlayers(PlayerList.java:754) ~[?:?] {}
at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:559) ~[?:?] {pl:accesstransformer:B}
at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:235) ~[?:?] {pl:runtimedistcleaner:A}
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:684) [?:?] {pl:accesstransformer:B}
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] {}
I am trying to create an entity similar to the Area Effect Cloud, but instead of effecting all entities with a potion effect, I want to destroy all vegetation in the area that the cloud covers. My current code crashes on /summon with the Ticking Entity Exception.
Crash Report:
My github repo is: https://github.com/jay20162016/bombsaway_forge_mod
I believe you meant to do 'box = box.filter( . . .'
Hello!
I did that, but I still get a crash from the cast, which I can't replace:
Code:
Crash Report:
I got it working, but the radiation cloud doesn't destroy vegetation or give the radiation effect. It just stands there.