ZHorse

ZHorse

10.4k Downloads

Clone chested horse inventory upon teleportation

Zedd7 opened this issue ยท 1 comments

commented

The alternative teleportation system used by /zh here duplicates the source horse by :

  1. spawning a copy horse of the same variant at the player's location
  2. cloning all attributes and inventory of the source horse to the copy horse
  3. 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