Clone chested horse inventory upon teleportation
Zedd7 opened this issue ยท 1 comments
The alternative teleportation system used by /zh here duplicates the source horse by :
- spawning a copy horse of the same variant at the player's location
- cloning all attributes and inventory of the source horse to the copy horse
- removing the source horse
Since 1.11 the cloning of inventory is bugged if the source horse is an instance of ChestedHorse (Donkey, Mule or Llama) in two ways :
- ChestedHorse.setCarryingChest(true) does place a chest on the copy horse but the Minecraft client of the player crashes he try to put an item in that chest. HorseManager.java#L212
- Inventory.setContents(ItemStack[]) throws a IllegalArgumentException if the horse is an instance of ChestedHorse HorseManager.java#L214
Both bugs seems to have been fixed by last CraftBukkit patch : https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/691628ab5cc38c77b9c1a9bd884c7ce40b96373c