Mojira Archive
MC-80155

Hitting with negative looting

When you hit a mob (like Zombie) with an item which has a negative looting enchantment, it gives an error message:

Error message
[18:11:18] [Server thread/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: bound must be positive
	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_25]
	at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_25]
	at g.a(SourceFile:61) [1.8.4.jar:?]
	at net.minecraft.server.MinecraftServer.B(SourceFile:579) [1.8.4.jar:?]
	at net.minecraft.server.MinecraftServer.A(SourceFile:535) [1.8.4.jar:?]
	at bpo.A(SourceFile:152) [1.8.4.jar:?]
	at net.minecraft.server.MinecraftServer.run(SourceFile:451) [1.8.4.jar:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]
Caused by: java.lang.IllegalArgumentException: bound must be positive
	at java.util.Random.nextInt(Random.java:388) ~[?:1.8.0_25]
	at vw.b(SourceFile:175) ~[1.8.4.jar:?]
	at pr.a(SourceFile:732) ~[1.8.4.jar:?]
	at we.a(SourceFile:619) ~[1.8.4.jar:?]
	at pr.a(SourceFile:684) ~[1.8.4.jar:?]
	at vv.a(SourceFile:53) ~[1.8.4.jar:?]
	at we.a(SourceFile:207) ~[1.8.4.jar:?]
	at vw.a(SourceFile:143) ~[1.8.4.jar:?]
	at wn.f(SourceFile:1045) ~[1.8.4.jar:?]
	at lf.f(SourceFile:935) ~[1.8.4.jar:?]
	at lm.a(SourceFile:772) ~[1.8.4.jar:?]
	at in.a(SourceFile:52) ~[1.8.4.jar:?]
	at in.a(SourceFile:11) ~[1.8.4.jar:?]
	at fh$1.run(SourceFile:13) ~[1.8.4.jar:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_25]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_25]
	at g.a(SourceFile:60) ~[1.8.4.jar:?]
	... 5 more
Item command
/give @p stick 1 0 {ench:[{id:16,lvl:32767},{id:21,lvl:32768}]}

Note that looting seems to be the only enchantment which throws an error when it has a negative value

Invalid

Marcono1234

2015-05-07, 07:26 PM

2015-09-06, 06:39 PM

2015-05-07, 07:28 PM

0

0

Unconfirmed

looting, negative

Minecraft 1.8.4

-