[SPIGOT-3977] Horse variants & Llama - getStorageContents contain "non-storage" slot Created: 27/Jun/18  Updated: 27/Jun/18

Status: Open
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: MrMaThaMi Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: Llama, horse, inventory, spigot
Environment:

CraftBukkit version git-Spigot-642f6d2-fbe3046 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)


Version: Spigot-1.12.2

 Description   

Currently (Spigot-1.12.2), calling Inventory.getStorageContents  _ (_instanceof AbstractHorseInventory) on Llama and all horse variant will return exactly the same as Inventory.getContents, including 2 "non-storage" slot.

In Vannila Minecraft, Horse have 2 "non-storage" slots, one for saddle, one for horse armor, but all other horse variant have only 1 "non-storage" slot for saddle. Llama otherwise have only 1 "non-storage" slot for carpet.

I think that there is some change should be made:

  • getStorageContents for Llama and all horse variant shouldn't include that 2 "non-storage" slot.
  • Llama Inventory should not be instanceof AbstractHorseInventory, only instanceof LlamaInventory.
  • LlamaInventory should have 1 "non-storage" slot for carpet, have getDecor, setDecor but not getSaddle, setSaddle.

 



 Comments   
Comment by md_5 [ 27/Jun/18 ]

Please don't clone it.
You should just be able to click the description
http://files.md-5.net/s/eKyJYQR.png

Comment by MrMaThaMi [ 27/Jun/18 ]

I can only clone the issue, or do I find the wrong place?

Comment by md_5 [ 27/Jun/18 ]

You should be able to, just click on it

Comment by MrMaThaMi [ 27/Jun/18 ]

A little digging show me that only Horse use the Armor slot, other variants don't use it at all. Even if summon a skeleton horse with an armor (that wasn't visible anyway) and then kill it, it won't drop the Armor. So @md_5, you are right.

btw I can't edit my issue description

Comment by md_5 [ 27/Jun/18 ]

Also
>Another possible problem is that HorseInventory is for Horse, but not for Donkey and Mule (they are AbstractHorseInventory).

This seems correct to me. You can't actually put armor on a donkey or mule can you?

btw you can't delete classes without a very very good reason - breaks plugins people have already written

Comment by MrMaThaMi [ 27/Jun/18 ]

thanks a lot.

Comment by md_5 [ 27/Jun/18 ]

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse

Comment by MrMaThaMi [ 27/Jun/18 ]

I don't set git link anywhere. Can you show me how to start please? (sorry my english is bad)

Comment by md_5 [ 27/Jun/18 ]

Pull requests welcome

Generated at Fri Mar 14 15:13:05 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.