Shop Keepers jumping
lukeeexd opened this issue ยท 6 comments
Paper version git-Paper-213 (MC: 1.13.1) (Implementing API version 1.13.1-R0.1-SNAPSHOT)
Shopkeepers-2.4.0.jar
https://streamable.com/5hlk9 Why do shopkeepers jump?
Good question. They jump in MC version 1.12 also I was thinking that they did this when they became activated when someone walked close to them.
All shopkeeper entities get teleported back to their original spawn location every 10 seconds, if they for some reason move further than ~0.5 blocks.
When placing a shopkeeper, it spawns it in the middle of the block above the block you are targeting (if you are targeting the top face of a block). So if you target some non-solid (passable) block (like grass, flowers, ..) or a non-1x1x1-block (like snow, flower pots, plates, .. or like in your case: carpets) then the actual spawn location will currently be 1 block above that. The spawned shopkeeper will then however fall 'into' the block below it (due to gravity), resulting in the periodic back-teleportation every ~10 seconds (the 'jumping' you observe).
I am aware of this 'inconvenience', but haven't come around yet to fix it (though I did some preparation with the latest updates by refactoring the shopkeeper creation and by having to check block bounding boxes for the custom gravity behavior already).
This would probably be easier to fix if Bukkit had some sort of API for checking if a block is passable or, more general, for getting the exact bounding box of a block. (I haven't come around yet to provide Spigot with a corresponding addition PR for this, but you can consider upvoting this corresponding spigot ticket: https://hub.spigotmc.org/jira/browse/SPIGOT-2151, so maybe someone else picks it up)
Not a bug, It's a feature, of Minecraft that is. It's nice to know this. All I have to do is remove my red carpet and replace the block below it with red wool. Easy, Peasy! I wouldn't try to fix this since this is the natural order of Minecraft. The best thing you could do is to update all documentation to inform users that this is the case when placing a Shopkeeper.
You can also remove the carpet, then place the shopkeeper there, then re-add the carpet. That should work as well.