mojira.dev
MC-178259

Game crashes when an iron golem with the attack damage attribute set to 0.5d

The bug

The game crashes after an iron golem hits something while it has the attack damage attribute set to 0.5d.

How to reproduce

  1. /summon minecraft:iron_golem ~ ~ ~ {Attributes:[{Base:0.5d,Name:"generic.attack_damage"}]}
  2. Set gamemode to survival

  3. Attack the iron golem
    → ❌ it crashes

Crash Report

20w15a\: [^crash-2020-04-11_17.47.18-server.txt]

Description: Ticking entity

java.lang.IllegalArgumentException: bound must be positive
	at java.util.Random.nextInt(Unknown Source)
	at axb.B(SourceFile:163)
	at ata.a(SourceFile:138)
	at ata.e(SourceFile:130)
	at aug.e(SourceFile:55)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
	at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
	at java.util.Iterator.forEachRemaining(Unknown Source)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
	at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.util.stream.ReferencePipeline.forEach(Unknown Source)
	at ass.a(SourceFile:82)
	at anp.dD(SourceFile:710)
	at ano.l(SourceFile:2374)
	at anp.l(SourceFile:521)
	at axb.l(SourceFile:111)
	at ano.h(SourceFile:2216)
	at anp.h(SourceFile:326)
	at yl.a(SourceFile:592)
	at bof.a(SourceFile:577)
	at yl.a(SourceFile:407)
	at net.minecraft.server.MinecraftServer.b(SourceFile:852)
	at net.minecraft.server.MinecraftServer.a(SourceFile:791)
	at emb.a(SourceFile:128)
	at net.minecraft.server.MinecraftServer.run(SourceFile:650)
	at java.lang.Thread.run(Unknown Source)


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

-- Head --
Thread: Server thread
Stacktrace:
	at java.util.Random.nextInt(Unknown Source)
	at axb.B(SourceFile:163)
	at ata.a(SourceFile:138)
	at ata.e(SourceFile:130)
	at aug.e(SourceFile:55)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
	at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
	at java.util.Iterator.forEachRemaining(Unknown Source)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
	at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.util.stream.ReferencePipeline.forEach(Unknown Source)
	at ass.a(SourceFile:82)
	at anp.dD(SourceFile:710)
	at ano.l(SourceFile:2374)
	at anp.l(SourceFile:521)
	at axb.l(SourceFile:111)
	at ano.h(SourceFile:2216)
	at anp.h(SourceFile:326)
	at yl.a(SourceFile:592)

-- Entity being ticked --
Details:
	Entity Type: minecraft:iron_golem (axb)
	Entity ID: 123
	Entity Name: Iron Golem
	Entity's Exact location: 20.66, 4.00, -4.40
	Entity's Block location: World: (20,4,-5), Chunk: (at 4,0,11 in 1,-1; contains blocks 16,0,-16 to 31,255,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
	Entity's Momentum: 0.02, -0.08, 0.07
	Entity's Passengers: []
	Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
	at bof.a(SourceFile:577)
	at yl.a(SourceFile:407)

-- Affected level --
Details:
	All players: 1 total; [ym['MobTron'/8, l='New World', x=19.86, y=4.75, z=-1.85]]
	Chunk stats: ServerChunkCache: 2209
	Level dimension: minecraft:overworld
	Level name: New World
	Level seed: 1160709618883399613
	Level generator: ID 01 - flat, ver 0. Features enabled: true
	Level generator options: NBT[{biome:"minecraft:the_void",layers:[{block:"minecraft:air",height:1}],structures:{decoration:{}}}]
	Level spawn location: World: (0,4,0), Chunk: (at 0,0,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
	Level time: 6903 game time, 6903 day time
	Known server brands: vanilla
	Level was modded: false
	Level storage version: 0x04ABD - Anvil
	Level weather: Rain time: 13880 (now: false), thunder time: 103112 (now: false)
	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
Stacktrace:
	at net.minecraft.server.MinecraftServer.b(SourceFile:852)
	at net.minecraft.server.MinecraftServer.a(SourceFile:791)
	at emb.a(SourceFile:128)
	at net.minecraft.server.MinecraftServer.run(SourceFile:650)
	at java.lang.Thread.run(Unknown Source)

-- System Details --
Details:
	Minecraft Version: 20w15a
	Minecraft Version ID: 20w15a
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_201, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 284542328 bytes (271 MB) / 590663680 bytes (563 MB) up to 1060372480 bytes (1011 MB)
	CPUs: 4
	JVM Flags: 6 total; -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
	Player Count: 1 / 8; [ym['MobTron'/8, l='New World', x=19.86, y=4.75, z=-1.85]]
	Data Packs: vanilla
	Type: Integrated Server (map_client.txt)
	Is Modded: Probably not. Jar signature remains and both client + server brands are untouched.

Attachments

Comments 0

No comments.

DrownedZombie

eowyn36

Confirmed

Very Important

Crash

20w15a, 20w16a

20w17a

Retrieved