Skip to content

Setting Saddle ArrayIndexOutOfBoundsException #12412

@Absolutionism

Description

@Absolutionism

Expected behavior

No exception and a horse to equip the saddle

Observed/Actual behavior

Throws exception

[12:11:24 ERROR]: #!#! Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
[12:11:24 ERROR]: #!#!     at java.base/java.util.Arrays$ArrayList.set(Arrays.java:4271)
[12:11:24 ERROR]: #!#!     at net.minecraft.core.NonNullList.set(NonNullList.java:50)
[12:11:24 ERROR]: #!#!     at net.minecraft.world.SimpleContainer.setItem(SimpleContainer.java:213)
[12:11:24 ERROR]: #!#!     at org.bukkit.craftbukkit.inventory.CraftInventoryAbstractHorse.setItem(CraftInventoryAbstractHorse.java:108)
[12:11:24 ERROR]: #!#!     at org.bukkit.craftbukkit.inventory.CraftInventoryAbstractHorse.setSaddle(CraftInventoryAbstractHorse.java:25)

Steps/models to reproduce

((AbstractHorse) entity).setSaddle(new ItemStack(Material.SADDLE))

Plugin and Datapack List

Skript

Paper version

1.21.5

Other

No response

Metadata

Metadata

Assignees

Labels

priority: highThis issue is either a gamebreaking bug or crash and needs to be addressed soon.status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.version: 1.21.5Game version 1.21.5

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions