forked from GeyserMC/Geyser
Fixed fishing rod lines not connecting to other players (#580)
This commit is contained in:
parent
b4ecb88d49
commit
3220532083
1 changed files with 7 additions and 3 deletions
|
@ -37,10 +37,14 @@ public class FishingHookEntity extends Entity {
|
|||
public FishingHookEntity(long entityId, long geyserId, EntityType entityType, Vector3f position, Vector3f motion, Vector3f rotation, ProjectileData data) {
|
||||
super(entityId, geyserId, entityType, position, motion, rotation);
|
||||
|
||||
// TODO: Find a better way to do this
|
||||
for (GeyserSession session : GeyserConnector.getInstance().getPlayers().values()) {
|
||||
if (session.getPlayerEntity().getEntityId() == data.getOwnerId()) {
|
||||
this.metadata.put(EntityData.OWNER_EID, session.getPlayerEntity().getGeyserId());
|
||||
Entity entity = session.getEntityCache().getEntityByJavaId(data.getOwnerId());
|
||||
if (entity == null && session.getPlayerEntity().getEntityId() == data.getOwnerId()) {
|
||||
entity = session.getPlayerEntity();
|
||||
}
|
||||
|
||||
if (entity != null) {
|
||||
this.metadata.put(EntityData.OWNER_EID, entity.getGeyserId());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue