mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-28 18:52:03 -07:00
Add null check to level ref in Entity constructor (#12218)
This commit is contained in:
@@ -192,7 +192,7 @@
|
|||||||
this.entityData = builder.build();
|
this.entityData = builder.build();
|
||||||
this.setPos(0.0, 0.0, 0.0);
|
this.setPos(0.0, 0.0, 0.0);
|
||||||
this.eyeHeight = this.dimensions.eyeHeight();
|
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) {
|
public boolean isColliding(BlockPos pos, BlockState state) {
|
||||||
|
Reference in New Issue
Block a user