Shopkeepers

Shopkeepers

2M Downloads

Setting to make shop entities unpushable

blablubbabcDEV opened this issue ยท 1 comments

commented

Migrated from: https://dev.bukkit.org/projects/shopkeepers/issues/369

Originally posted by blablubbabc (Mar 16, 2016):

Options considered so far:

  • NoAI tag: This also disables all other kinds of behavior (gravity, floating on water, looking at nearby players, ..). And Shopkeepers don't have any yaw+pitch values stored currently, so even when somehow using this, it will be incompatible with already setup shops unless one also manually re-implements the turn-towards-player behavior.

  • Look into spigot's collision api (spigot-api dependency instead of bukkit-api): Actually, this seems to be part of bukkit now, but doesn't work at all at current versions.. -> Currently trying to get changes into spigot about that, but those would only be available in the latest server versions then. TODO check if this works on older minecraft versions.

  • custom entity classes (similar to citizens): would probably also reliable solve the 'duplicate entities' issue without refreshing the shops on world saves, would require a lot more updating/maintaining, already possible by using citizens alongside shopkeepers

  • more frequent 'teleport back' checks? Or a task which constantly resets the velocity of entities? Might be heavy performance-wise. TODO: test this.

  • Let the entity be ridden by some invisible+small entity: possible candidate is a marker-armorstand, however: custom names won't show anymore then, and the armorstand's height is to low to properly replace the nametag. Using other entities: Increased risk of interferring with other plugins, and they have a hitbox preventing the clicking of the shopkeeper entity from certain angles.

  • Let the entity ride some other, stationary invisible entity? (ex. marker armor stands): Marker-tag only available in late 1.8.x versions, armor-stands don't float on water (could be done by disabling gravity on them and manually calculating a proper (but stationary) shopkeeper position), issue: entities eject from their vehicle-entity when it is in water and there seems to be no way to prevent that. TODO: Look into whether this can be solved via bukkit API additions.

  • Let the entity ride an area-effect-cloud: their blocking hitbox is even smaller (they have none) compared to marker armor stands, they can exist everywhere (even inside blocks) without interferring block placement and clicking of players, they are not living-entities so they should not drop their passenger inside water -> This might be a good solution, but it's only available on 1.9+ (might not be an issue though), and they are not affected by gravity (would have to manually place them correctly, which should not be a problem though). Other potential problem: Riding entities seem to keep rotating back and fourth between facing the player and their primary viewing direction.

  • Using scoreboard teams collision API: Available in early versions of 1.8?, very likely interferes with all kinds of other plugins which expect tu use the scoreboard solely on their own.

  • Something else? I am open for suggestions/ideas on how to do this.

commented

This should be fixed with the new mob behavior in v2.0.0-beta.