Spawner with weight 0 crashes game
A spawner with SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:
/setblock ~ ~ ~ spawner{Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:pig}}]}
Crash log attached.
Description: Ticking block entity java.lang.IllegalArgumentException at aaf.a(SourceFile:18) at aaf.a(SourceFile:37) at bgs.i(SourceFile:179) at bgs.c(SourceFile:91) at bup.T_(SourceFile:62) at bhl.K(SourceFile:625) at vi.a(SourceFile:402) at net.minecraft.server.MinecraftServer.b(SourceFile:824) at net.minecraft.server.MinecraftServer.a(SourceFile:763) at dxn.a(SourceFile:128) at net.minecraft.server.MinecraftServer.run(SourceFile:631) at java.lang.Thread.run(Thread.java:745)
The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:armor_stand},Weight:2147483647},{Entity:{id:armor_stand},Weight:1}]}
This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
Created Issue:
MinecartSpawner with weight 0 crashes game
A MinecartSpawner with SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:
summon MinecartSpawner ~ ~1 ~ {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:Pig}}]}The world starts back up just fine. You can even log in and see the MinecartSpawner. Indeed a weight of 0 makes no sense, but this shouldn't cause the entire game to crash.
Crash log attached.
Interestingly, the block version does not cause a crash:
setblock ~ ~1 ~ mob_spawner 0 {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:Pig}}]}Environment
Windows 7 64-bit, Java 8 update 60
A MinecartSpawner with SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:
summon MinecartSpawner ~ ~1 ~ {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:Pig}}]}The world starts back up just fine. You can even log in and see the MinecartSpawner. Indeed a weight of 0 makes no sense, but this shouldn't cause the entire game to crash.
Crash log attached.
Interestingly, the block version does not cause a crash:
setblock ~ ~1 ~ mob_spawner 0 {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:Pig}}]}15w45aDescription: Ticking entity java.lang.IllegalArgumentException at ov.a(SourceFile:18) at ov.a(SourceFile:37) at ahe.i(SourceFile:129) at ahe.c(SourceFile:69) at yh.m(SourceFile:66) at ahn.a(SourceFile:1481) at lq.a(SourceFile:719) at ahn.g(SourceFile:1459) at ahn.k(SourceFile:1349) at lq.k(SourceFile:552) at net.minecraft.server.MinecraftServer.D(SourceFile:618) at net.minecraft.server.MinecraftServer.C(SourceFile:546) at bxx.C(SourceFile:154) at net.minecraft.server.MinecraftServer.run(SourceFile:450) at java.lang.Thread.run(Thread.java:745)
is duplicated by
A MinecartSpawner with SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:
summon MinecartSpawner ~ ~1 ~ {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:Pig}}]}The world starts back up just fine. You can even log in and see the MinecartSpawner. Indeed a weight of 0 makes no sense, but this shouldn't cause the entire game to crash.
Crash log attached.
Interestingly, the block version does not cause a crash:
setblock ~ ~1 ~ mob_spawner 0 {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:Pig}}]}15w45aDescription: Ticking entity java.lang.IllegalArgumentException at ov.a(SourceFile:18) at ov.a(SourceFile:37) at ahe.i(SourceFile:129) at ahe.c(SourceFile:69) at yh.m(SourceFile:66) at ahn.a(SourceFile:1481) at lq.a(SourceFile:719) at ahn.g(SourceFile:1459) at ahn.k(SourceFile:1349) at lq.k(SourceFile:552) at net.minecraft.server.MinecraftServer.D(SourceFile:618) at net.minecraft.server.MinecraftServer.C(SourceFile:546) at bxx.C(SourceFile:154) at net.minecraft.server.MinecraftServer.run(SourceFile:450) at java.lang.Thread.run(Thread.java:745)The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
/setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:"ArmorStand"},Weight:2147483647},{Entity:{id:"ArmorStand"},Weight:1}]}This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
A MinecartSpawner with SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:
summon MinecartSpawner ~ ~1 ~ {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:Pig}}]}The world starts back up just fine. You can even log in and see the MinecartSpawner. Indeed a weight of 0 makes no sense, but this shouldn't cause the entire game to crash.
Crash log attached.
Interestingly, the block version does not cause a crash:
setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:Pig}}]}15w45aDescription: Ticking entity java.lang.IllegalArgumentException at ov.a(SourceFile:18) at ov.a(SourceFile:37) at ahe.i(SourceFile:129) at ahe.c(SourceFile:69) at yh.m(SourceFile:66) at ahn.a(SourceFile:1481) at lq.a(SourceFile:719) at ahn.g(SourceFile:1459) at ahn.k(SourceFile:1349) at lq.k(SourceFile:552) at net.minecraft.server.MinecraftServer.D(SourceFile:618) at net.minecraft.server.MinecraftServer.C(SourceFile:546) at bxx.C(SourceFile:154) at net.minecraft.server.MinecraftServer.run(SourceFile:450) at java.lang.Thread.run(Thread.java:745)The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
/setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:"ArmorStand"},Weight:2147483647},{Entity:{id:"ArmorStand"},Weight:1}]}This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
A MinecartSpawner with SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:
summon MinecartSpawner ~ ~1 ~ {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:Pig}}]}The world starts back up just fine. You can even log in and see the MinecartSpawner. Indeed a weight of 0 makes no sense, but this shouldn't cause the entire game to crash.
Crash log attached.
Interestingly, the block version does not cause a crash:
setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:Pig}}]}15w45aDescription: Ticking entity java.lang.IllegalArgumentException at ov.a(SourceFile:18) at ov.a(SourceFile:37) at ahe.i(SourceFile:129) at ahe.c(SourceFile:69) at yh.m(SourceFile:66) at ahn.a(SourceFile:1481) at lq.a(SourceFile:719) at ahn.g(SourceFile:1459) at ahn.k(SourceFile:1349) at lq.k(SourceFile:552) at net.minecraft.server.MinecraftServer.D(SourceFile:618) at net.minecraft.server.MinecraftServer.C(SourceFile:546) at bxx.C(SourceFile:154) at net.minecraft.server.MinecraftServer.run(SourceFile:450) at java.lang.Thread.run(Thread.java:745)The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
/setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:"ArmorStand"},Weight:2147483647},{Entity:{id:"ArmorStand"},Weight:1}]}This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
Interestingly, the block version does not cause a crash:
Could you please remove this as it referred to the incorrect command
Coud you please include this?
And the setblock command provided in the description is invalid. The block placing mode ( for example replace) argument is missing.
A MinecartSpawner with SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:
summonMinecartSpawner~ ~1 ~ {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:Pig}}]}The world starts back up just fine. You can even log in and see the
MinecartSpawner. Indeed a weight of 0 makes no sense, but this shouldn't cause the entire game to crash.Crash log attached.
15w45aDescription: Ticking entity java.lang.IllegalArgumentException at ov.a(SourceFile:18) at ov.a(SourceFile:37) at ahe.i(SourceFile:129) at ahe.c(SourceFile:69) at yh.m(SourceFile:66) at ahn.a(SourceFile:1481) at lq.a(SourceFile:719) at ahn.g(SourceFile:1459) at ahn.k(SourceFile:1349) at lq.k(SourceFile:552) at net.minecraft.server.MinecraftServer.D(SourceFile:618) at net.minecraft.server.MinecraftServer.C(SourceFile:546) at bxx.C(SourceFile:154) at net.minecraft.server.MinecraftServer.run(SourceFile:450) at java.lang.Thread.run(Thread.java:745)The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
/setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:"ArmorStand"},Weight:2147483647},{Entity:{id:"ArmorStand"},Weight:1}]}This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
A MinecartSpawner with SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:
summon spawner_minecart ~ ~1 ~ {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:pig}}]}The world starts back up just fine. You can even log in and see the spawner_minecart. Indeed a weight of 0 makes no sense, but this shouldn't cause the entire game to crash.
Crash log attached.
15w45aDescription: Ticking entity java.lang.IllegalArgumentException at ov.a(SourceFile:18) at ov.a(SourceFile:37) at ahe.i(SourceFile:129) at ahe.c(SourceFile:69) at yh.m(SourceFile:66) at ahn.a(SourceFile:1481) at lq.a(SourceFile:719) at ahn.g(SourceFile:1459) at ahn.k(SourceFile:1349) at lq.k(SourceFile:552) at net.minecraft.server.MinecraftServer.D(SourceFile:618) at net.minecraft.server.MinecraftServer.C(SourceFile:546) at bxx.C(SourceFile:154) at net.minecraft.server.MinecraftServer.run(SourceFile:450) at java.lang.Thread.run(Thread.java:745)The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
/setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:"ArmorStand"},Weight:2147483647},{Entity:{id:"ArmorStand"},Weight:1}]}This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
A
MinecartSpawnerwith SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:summon spawner_minecart ~ ~1 ~ {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:pig}}]}The world starts back up just fine. You can even log in and see the spawner_minecart. Indeed a weight of 0 makes no sense, but this shouldn't cause the entire game to crash.
Crash log attached.
15w45aDescription: Ticking entity java.lang.IllegalArgumentException at ov.a(SourceFile:18) at ov.a(SourceFile:37) at ahe.i(SourceFile:129) at ahe.c(SourceFile:69) at yh.m(SourceFile:66) at ahn.a(SourceFile:1481) at lq.a(SourceFile:719) at ahn.g(SourceFile:1459) at ahn.k(SourceFile:1349) at lq.k(SourceFile:552) at net.minecraft.server.MinecraftServer.D(SourceFile:618) at net.minecraft.server.MinecraftServer.C(SourceFile:546) at bxx.C(SourceFile:154) at net.minecraft.server.MinecraftServer.run(SourceFile:450) at java.lang.Thread.run(Thread.java:745)The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
/setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:"ArmorStand"},Weight:2147483647},{Entity:{id:"ArmorStand"},Weight:1}]}This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
A spawner_minecart with SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:
summon spawner_minecart ~ ~1 ~ {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:pig}}]}The world starts back up just fine. You can even log in and see the spawner_minecart. Indeed a weight of 0 makes no sense, but this shouldn't cause the entire game to crash.
Crash log attached.
15w45aDescription: Ticking entity java.lang.IllegalArgumentException at ov.a(SourceFile:18) at ov.a(SourceFile:37) at ahe.i(SourceFile:129) at ahe.c(SourceFile:69) at yh.m(SourceFile:66) at ahn.a(SourceFile:1481) at lq.a(SourceFile:719) at ahn.g(SourceFile:1459) at ahn.k(SourceFile:1349) at lq.k(SourceFile:552) at net.minecraft.server.MinecraftServer.D(SourceFile:618) at net.minecraft.server.MinecraftServer.C(SourceFile:546) at bxx.C(SourceFile:154) at net.minecraft.server.MinecraftServer.run(SourceFile:450) at java.lang.Thread.run(Thread.java:745)The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
/setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:"ArmorStand"},Weight:2147483647},{Entity:{id:"ArmorStand"},Weight:1}]}This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
A spawner_minecart with SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:
summon spawner_minecart ~ ~1 ~ {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:pig}}]}The world starts back up just fine. You can even log in and see the spawner_minecart. Indeed a weight of 0 makes no sense, but this shouldn't cause the entire game to crash.
Crash log attached.
15w45aDescription: Ticking entity java.lang.IllegalArgumentException at ov.a(SourceFile:18) at ov.a(SourceFile:37) at ahe.i(SourceFile:129) at ahe.c(SourceFile:69) at yh.m(SourceFile:66) at ahn.a(SourceFile:1481) at lq.a(SourceFile:719) at ahn.g(SourceFile:1459) at ahn.k(SourceFile:1349) at lq.k(SourceFile:552) at net.minecraft.server.MinecraftServer.D(SourceFile:618) at net.minecraft.server.MinecraftServer.C(SourceFile:546) at bxx.C(SourceFile:154) at net.minecraft.server.MinecraftServer.run(SourceFile:450) at java.lang.Thread.run(Thread.java:745)The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
/setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:"ArmorStand"},Weight:2147483647},{Entity:{id:"ArmorStand"},Weight:1}]}This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
A spawner_minecart with SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:
summon spawner_minecart ~ ~1 ~ {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:pig}}]}The world starts back up just fine. You can even log in and see the spawner_minecart. Indeed a weight of 0 makes no sense, but this shouldn't cause the entire game to crash.
Crash log attached.
15w45aDescription: Ticking entity java.lang.IllegalArgumentException at ov.a(SourceFile:18) at ov.a(SourceFile:37) at ahe.i(SourceFile:129) at ahe.c(SourceFile:69) at yh.m(SourceFile:66) at ahn.a(SourceFile:1481) at lq.a(SourceFile:719) at ahn.g(SourceFile:1459) at ahn.k(SourceFile:1349) at lq.k(SourceFile:552) at net.minecraft.server.MinecraftServer.D(SourceFile:618) at net.minecraft.server.MinecraftServer.C(SourceFile:546) at bxx.C(SourceFile:154) at net.minecraft.server.MinecraftServer.run(SourceFile:450) at java.lang.Thread.run(Thread.java:745)The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:armor_stand},Weight:2147483647},{Entity:{id:armor_stand},Weight:1}]}This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
MinecartSpawnerwith weight 0 crashes gamespawner_minecart with weight 0 crashes game
spawner_minecartwith weight 0 crashes gameSpawner with weight 0 crashes game
is duplicated by
Windows 7 64-bit, Java 8 update 60
is duplicated by
A spawner
_minecartwith SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:summon spawner_minecart~ ~1~ {Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:pig}}]}The world starts back up just fine. You can even log in and see the spawner_minecart. Indeed a weight of 0 makes no sense, but this shouldn't cause the entire game to crash.
Crash log attached.
15w45aDescription: Ticking entity java.lang.IllegalArgumentException atov.a(SourceFile:18) atov.a(SourceFile:37) atahe.i(SourceFile:129) atahe.c(SourceFile:69) atyh.m(SourceFile:66) atahn.a(SourceFile:1481) at lq.a(SourceFile:719) at ahn.g(SourceFile:1459) atahn.k(SourceFile:1349) at lq.k(SourceFile:552) at net.minecraft.server.MinecraftServer.D(SourceFile:618) at net.minecraft.server.MinecraftServer.C(SourceFile:546) atbxx.C(SourceFile:154) at net.minecraft.server.MinecraftServer.run(SourceFile:450) at java.lang.Thread.run(Thread.java:745)The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:armor_stand},Weight:2147483647},{Entity:{id:armor_stand},Weight:1}]}This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
A spawner with SpawnPotentials containing an entry with a Weight of 0 causes the game (or server) to crash:
/setblock ~ ~ ~ spawner{Delay:-1,SpawnPotentials:[{Weight:0,Entity:{id:pig}}]}Crash log attached.
1.14.3 pre-2Description: Ticking block entity java.lang.IllegalArgumentException at aaf.a(SourceFile:18) at aaf.a(SourceFile:37) at bgs.i(SourceFile:179) at bgs.c(SourceFile:91) at bup.T_(SourceFile:62) at bhl.K(SourceFile:625) at vi.a(SourceFile:402) at net.minecraft.server.MinecraftServer.b(SourceFile:824) at net.minecraft.server.MinecraftServer.a(SourceFile:763) at dxn.a(SourceFile:128) at net.minecraft.server.MinecraftServer.run(SourceFile:631) at java.lang.Thread.run(Thread.java:745)The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:armor_stand},Weight:2147483647},{Entity:{id:armor_stand},Weight:1}]}This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
I don't know why 1.12 is listed in here, but when I try to summon one in 1.12 with a weight of 0, it simply says "Unable to summon object". Changing the weight to 1 fixes it. Probably fixed then.
Duplicates MC-89880
Confirmed for
The reason for this is that the game throws a IllegalArgumentException in case the sum of all weights is <= 0. This means this bug is also caused when negative weights are provided or when the weights overflow:
/setblock ~ ~1 ~ mob_spawner 0 replace {Delay:-1s,MinSpawnDelay:3s,MaxSpawnDelay:3s,SpawnPotentials:[{Entity:{id:"ArmorStand"},Weight:2147483647},{Entity:{id:"ArmorStand"},Weight:1}]}This affects also loot tables but only if the weight sum overflows. There it does not crash but prints the exception in the log only.
Confirmed for 1.9.4. See attached crash report crash-2016-05-23_14.02.43-server.txt
Confirmed for 1.11.2 but no crash report (only said in the launcher that it crashed)
The command now fails with an error instead of crashing. Changing the 0 to any other number causes the summon to work, therefore it seems this is meaningfully fixed.
The block version still crashes the game. Reopened, updated crash report and command.
This still crashes the game as of 1.16.4.