mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-14 18:13:43 +01:00
fix nullability crash in Carriage.java
This commit is contained in:
parent
157077b0ef
commit
52593a2ae9
1 changed files with 10 additions and 5 deletions
|
@ -16,6 +16,8 @@ import java.util.function.Function;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
|
||||||
import org.apache.commons.lang3.mutable.MutableDouble;
|
import org.apache.commons.lang3.mutable.MutableDouble;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
|
@ -249,8 +251,11 @@ public class Carriage {
|
||||||
|
|
||||||
boolean discard =
|
boolean discard =
|
||||||
!currentlyTraversedDimensions.isEmpty() && !currentlyTraversedDimensions.contains(entry.getKey());
|
!currentlyTraversedDimensions.isEmpty() && !currentlyTraversedDimensions.contains(entry.getKey());
|
||||||
ServerLevel currentLevel = level.getServer()
|
|
||||||
.getLevel(entry.getKey());
|
MinecraftServer server = level.getServer();
|
||||||
|
if (server == null)
|
||||||
|
continue;
|
||||||
|
ServerLevel currentLevel = server.getLevel(entry.getKey());
|
||||||
if (currentLevel == null)
|
if (currentLevel == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue