mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-23 23:39:34 +01:00
Add null check to level ref in Entity constructor (#12218)
This commit is contained in:
parent
1d5e5a57e9
commit
8de7e356fa
1 changed files with 1 additions and 1 deletions
|
@ -192,7 +192,7 @@
|
|||
this.entityData = builder.build();
|
||||
this.setPos(0.0, 0.0, 0.0);
|
||||
this.eyeHeight = this.dimensions.eyeHeight();
|
||||
+ this.despawnTime = type == EntityType.PLAYER ? -1 : level.paperConfig().entities.spawning.despawnTime.getOrDefault(type, io.papermc.paper.configuration.type.number.IntOr.Disabled.DISABLED).or(-1); // Paper - entity despawn time limit
|
||||
+ this.despawnTime = level == null || type == EntityType.PLAYER ? -1 : level.paperConfig().entities.spawning.despawnTime.getOrDefault(type, io.papermc.paper.configuration.type.number.IntOr.Disabled.DISABLED).or(-1); // Paper - entity despawn time limit
|
||||
}
|
||||
|
||||
public boolean isColliding(BlockPos pos, BlockState state) {
|
||||
|
|
Loading…
Add table
Reference in a new issue