New guard condition in genreateLightBrightnessTable()
Some users were reporting very sporatic crashes in generateLightBrightnessTable() when the server was starting up. It's possible that very occasionally, the server will register the pocket dimension before any pocket dimension data is initialized, forcing the light brightness table to get generated server side with bad values.
This commit is contained in:
parent
7a82abf182
commit
27d17d86a1
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
package StevenDimDoors.mod_pocketDim.world;
|
||||
|
||||
import StevenDimDoors.mod_pocketDim.core.NewDimData;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
@ -89,7 +90,8 @@ public class PocketProvider extends WorldProvider
|
|||
@Override
|
||||
protected void generateLightBrightnessTable()
|
||||
{
|
||||
if(!PocketManager.isLoaded() || PocketManager.getDimensionData(this.dimensionId).type() == DimensionType.POCKET)
|
||||
NewDimData data = PocketManager.getDimensionData(this.dimensionId);
|
||||
if(!PocketManager.isLoaded() || data == null || data.type() == DimensionType.POCKET)
|
||||
{
|
||||
super.generateLightBrightnessTable();
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue