Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-09-17 00:33:47 +02:00
Fixed fishing rod lines not connecting to other players (#580)
Dieser Commit ist enthalten in:
Ursprung
b4ecb88d49
Commit
3220532083
@ -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) {
|
public FishingHookEntity(long entityId, long geyserId, EntityType entityType, Vector3f position, Vector3f motion, Vector3f rotation, ProjectileData data) {
|
||||||
super(entityId, geyserId, entityType, position, motion, rotation);
|
super(entityId, geyserId, entityType, position, motion, rotation);
|
||||||
|
|
||||||
// TODO: Find a better way to do this
|
|
||||||
for (GeyserSession session : GeyserConnector.getInstance().getPlayers().values()) {
|
for (GeyserSession session : GeyserConnector.getInstance().getPlayers().values()) {
|
||||||
if (session.getPlayerEntity().getEntityId() == data.getOwnerId()) {
|
Entity entity = session.getEntityCache().getEntityByJavaId(data.getOwnerId());
|
||||||
this.metadata.put(EntityData.OWNER_EID, session.getPlayerEntity().getGeyserId());
|
if (entity == null && session.getPlayerEntity().getEntityId() == data.getOwnerId()) {
|
||||||
|
entity = session.getPlayerEntity();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity != null) {
|
||||||
|
this.metadata.put(EntityData.OWNER_EID, entity.getGeyserId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren