Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-174498

Game crashes when an adult hoglin with generic.attackDamage < 1 tries to attack something

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 20w12a
    • 20w11a
    • None
    • Confirmed
    • Crash
    • Very Important

      The bug

      The game crashes when an adult hoglin with generic.attackDamage set to >1 tries to attack something.

      How to reproduce

      /summon hoglin ~ ~ ~ {Attributes:[{Base:0.5d,Name:"generic.attackDamage"}],Age:0}
      /gamemode survival
      

      -> game crashes when hoglin attacks you

      Crash Report

      Description: Ticking entity
      
      java.lang.IllegalArgumentException: bound must be positive
      	at java.util.Random.nextInt(Random.java:388)
      	at bae.B(SourceFile:154)
      	at aou.a(SourceFile:46)
      	at aou.a(SourceFile:16)
      	at apf.a(SourceFile:69)
      	at anv.e(SourceFile:49)
      	at ang.b(SourceFile:380)
      	at ang$$Lambda$3251/223941269.accept(Unknown Source)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      	at java.util.Iterator.forEachRemaining(Iterator.java:116)
      	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1683)
      	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270)
      	at java.util.TreeMap$ValueSpliterator.forEachRemaining(TreeMap.java:2893)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
      	at ang.c(SourceFile:380)
      	at ang.a(SourceFile:342)
      	at bae.dZ(SourceFile:207)
      	at amr.dy(SourceFile:674)
      	at amq.l(SourceFile:2305)
      	at amr.l(SourceFile:498)
      	at amf.l(SourceFile:126)
      	at avq.l(SourceFile:49)
      	at bae.l(SourceFile:220)
      	at amq.h(SourceFile:2147)
      	at amr.h(SourceFile:303)
      	at yg.a(SourceFile:604)
      	at yg$$Lambda$3226/1374895670.accept(Unknown Source)
      	at bmy.a(SourceFile:542)
      	at yg.a(SourceFile:400)
      	at net.minecraft.server.MinecraftServer.b(SourceFile:860)
      	at net.minecraft.server.MinecraftServer.a(SourceFile:799)
      	at ejv.a(SourceFile:129)
      	at net.minecraft.server.MinecraftServer.run(SourceFile:658)
      	at java.lang.Thread.run(Thread.java:745)
      

            Karaoglu [Mojang] eowyn36
            TheBoy358 TheBoy358
            Votes:
            8 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: