From db5298e40c50a181ca7909ed7e96dcc2d5c3620b Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 26 Oct 2020 11:52:33 -0400 Subject: [PATCH] Headless cleanup --- core/src/mindustry/ctype/UnlockableContent.java | 2 +- core/src/mindustry/type/weather/ParticleWeather.java | 2 +- core/src/mindustry/world/Block.java | 2 +- gradle.properties | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/ctype/UnlockableContent.java b/core/src/mindustry/ctype/UnlockableContent.java index cd2b6a21d5..ae62ffd1de 100644 --- a/core/src/mindustry/ctype/UnlockableContent.java +++ b/core/src/mindustry/ctype/UnlockableContent.java @@ -123,7 +123,7 @@ public abstract class UnlockableContent extends MappableContent{ } public boolean unlocked(){ - if(net.client()) return state.rules.researched.contains(name); + if(net != null && net.client()) return state.rules.researched.contains(name); return unlocked || alwaysUnlocked; } diff --git a/core/src/mindustry/type/weather/ParticleWeather.java b/core/src/mindustry/type/weather/ParticleWeather.java index 463145085f..b8e5b6e8ba 100644 --- a/core/src/mindustry/type/weather/ParticleWeather.java +++ b/core/src/mindustry/type/weather/ParticleWeather.java @@ -34,7 +34,7 @@ public class ParticleWeather extends Weather{ //load noise texture //TODO mod support - if(drawNoise){ + if(drawNoise && Core.assets != null){ Core.assets.load("sprites/" + noisePath + ".png", Texture.class); } } diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 36c9d15e7b..59a75babf2 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -356,7 +356,7 @@ public class Block extends UnlockableContent{ current = entity -> entity.liquids == null ? Liquids.water : entity.liquids.current(); } bars.add("liquid", entity -> new Bar(() -> entity.liquids.get(current.get(entity)) <= 0.001f ? Core.bundle.get("bar.liquid") : current.get(entity).localizedName, - () -> current.get(entity).barColor(), () -> entity.liquids.get(current.get(entity)) / liquidCapacity)); + () -> current.get(entity).barColor(), () -> entity == null || entity.liquids == null ? 0f : entity.liquids.get(current.get(entity)) / liquidCapacity)); } if(hasPower && consumes.hasPower()){ diff --git a/gradle.properties b/gradle.properties index 4ec3ec745a..79032ee64c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=7090a07ce5d02dcb697f6c5a8d1fb6e0a00de45f +archash=f316225521c91df6c132b13fa2044d969ec39231