mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Check if the passenger is null before trying to update metadata (#1001)
* Check if the passenger is null before trying to update metadata * Fix variable name
This commit is contained in:
parent
b7f0780a56
commit
0c3a6f1a6a
1 changed files with 4 additions and 1 deletions
|
@ -78,7 +78,10 @@ public class StriderEntity extends AnimalEntity {
|
||||||
|
|
||||||
// Update the passengers if we have any
|
// Update the passengers if we have any
|
||||||
for (long passenger : passengers) {
|
for (long passenger : passengers) {
|
||||||
session.getEntityCache().getEntityByJavaId(passenger).updateBedrockMetadata(session);
|
Entity passengerEntity = session.getEntityCache().getEntityByJavaId(passenger);
|
||||||
|
if (passengerEntity != null) {
|
||||||
|
passengerEntity.updateBedrockMetadata(session);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
super.updateBedrockMetadata(session);
|
super.updateBedrockMetadata(session);
|
||||||
|
|
Loading…
Reference in a new issue