[SPIGOT-6733] Wrong entity passengers visual Created: 11/Sep/21 Updated: 09/Dec/21 |
|
Status: | Open |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Lorenzo | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 0 |
Labels: | entity | ||
Environment: |
Windows 10 |
Attachments: |
![]() ![]() |
Version: | This server is running CraftBukkit version 3241-Spigot-6c1c1b2-1492826 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) |
Plugin: | QualityArmoryVehicles2 |
Guidelines Read: | Yes |
Description |
I have a very strange problem: I'm working to an update for my vehicles plugin, I created an armorstand for each passenger and when the main one moves, with some math and vectors the other one goes with it. Now, from my main account I see everything normal(image 1) but from the other one I see a strange thing: I see myself without the armorstand(image 2) This is the code I think cause the bug: double offDis = offset.distanceSquared(e.getLocation()); if (offDis > 1) { final Entity rider = e.getPassenger(); e.eject(); e.teleport(offset); if (rider != null) { rider.teleport(offset); e.setPassenger(rider); } } Spigot Thread: https://www.spigotmc.org/threads/wrong-entity-passengers-visual.525270/ |
Comments |
Comment by Lorenzo [ 09/Dec/21 ] |
I've fixed by delaying of 5 ticks the e.setPassenger(rider); action |
Comment by Lorenzo [ 11/Sep/21 ] |
I don't really know if this is a spigot bug but I think yes because I tried with older versions like 1.12.2 and it seems to work |