Mojira Archive
MC-273555

Using various weapons with level 0 enchantments crashes the game

When giving the player a crossbow with the quick_charge enchantment with level 0 the game instantly crashes when the player tries to use it. If the player is on a server the player get kicked out of the server. 

How to reproduce:

  1. Run the command:
    /give @p minecraft:crossbow[minecraft:enchantments={quick_charge:0}]
  2. Put the crossbow in your main hand and use it.

Observed result:
The game instantly crashes when player uses the crossbow

Expected result:
The game does not crash.

Crash:
The game crashed whilst ticking player
Error: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 3

Fixed

AlbanT1

[Mojang] etanaratsastaja

2024-06-18, 11:12 AM

2024-10-07, 10:27 AM

2024-06-19, 08:23 AM

4

3

Community Consensus

Important

Platform

Crash, Enchantments

1.21

24w33a