diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index b02198d644..502d3f2571 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -33,10 +33,6 @@ import static mindustry.Vars.*; public class Logic implements ApplicationListener{ public Logic(){ - Events.on(WorldLoadEvent.class, event -> { - //TODO remove later - //Weathers.snow.create(); - }); Events.on(WaveEvent.class, event -> { if(state.isCampaign()){ diff --git a/core/src/mindustry/ctype/Content.java b/core/src/mindustry/ctype/Content.java index 19196a5f4a..7565dc88b0 100644 --- a/core/src/mindustry/ctype/Content.java +++ b/core/src/mindustry/ctype/Content.java @@ -14,7 +14,7 @@ public abstract class Content implements Comparable, Disposable{ public Content(){ - this.id = (short) Vars.content.getBy(getContentType()).size; + this.id = (short)Vars.content.getBy(getContentType()).size; Vars.content.handleContent(this); } @@ -25,15 +25,13 @@ public abstract class Content implements Comparable, Disposable{ public abstract ContentType getContentType(); /** Called after all content and modules are created. Do not use to load regions or texture data! */ - public void init(){ - } + public void init(){} /** * Called after all content is created, only on non-headless versions. * Use for loading regions or other image data. */ - public void load(){ - } + public void load(){} /** @return whether an error ocurred during mod loading. */ public boolean hasErrored(){ diff --git a/core/src/mindustry/net/Registrator.java b/core/src/mindustry/net/Registrator.java index 8e3c48dc51..c0368497f5 100644 --- a/core/src/mindustry/net/Registrator.java +++ b/core/src/mindustry/net/Registrator.java @@ -5,14 +5,14 @@ import arc.func.Prov; import mindustry.net.Packets.*; public class Registrator{ - private static ClassEntry[] classes = { + private static final ClassEntry[] classes = { new ClassEntry(StreamBegin.class, StreamBegin::new), new ClassEntry(StreamChunk.class, StreamChunk::new), new ClassEntry(WorldStream.class, WorldStream::new), new ClassEntry(ConnectPacket.class, ConnectPacket::new), new ClassEntry(InvokePacket.class, InvokePacket::new) }; - private static ObjectIntMap ids = new ObjectIntMap<>(); + private static final ObjectIntMap> ids = new ObjectIntMap<>(); static{ if(classes.length > 127) throw new RuntimeException("Can't have more than 127 registered classes!"); diff --git a/core/src/mindustry/type/Weather.java b/core/src/mindustry/type/Weather.java index d541a75029..cf2d5fc28d 100644 --- a/core/src/mindustry/type/Weather.java +++ b/core/src/mindustry/type/Weather.java @@ -71,7 +71,7 @@ public abstract class Weather extends MappableContent{ return ContentType.weather; } - @Remote + @Remote(called = Loc.server) public static void createWeather(Weather weather, float intensity, float duration){ weather.create(intensity, duration); } diff --git a/gradle.properties b/gradle.properties index d6e56b4a21..1652cb9f9d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=c8cdb44c30f50d0350c403547ad25532ad77c465 +archash=edaf52e6768e0c24cc4598de8105d07a6c66efd8