Skip to content

Commit

Permalink
Version bump, attempt to fix #127 - stops code executing and force ou…
Browse files Browse the repository at this point in the history
…tputs to log and stacktrace if client weather failed to init based on what I think is failing.
  • Loading branch information
Corosauce committed Apr 13, 2017
1 parent 4832897 commit bdd9f93
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {

apply plugin: 'forge'

version = "2.3.11"
version = "2.3.18"
group= "weather2" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "weather2-1.7.10"

Expand Down
5 changes: 4 additions & 1 deletion src/main/java/weather2/ClientTickHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ public static void checkClientWeather() {
ClientTickHandler.init(FMLClientHandler.instance().getClient().theWorld);
}
} catch (Exception ex) {
Weather.dbg("Warning, Weather2 client received packet before it was ready to use, and failed to init client weather due to null world");
//always get output for this
System.out.println("Warning, Weather2 weatherManager init failed for some reason, printing stacktrace, report to https://github.com/Corosauce/weather2/issues");

This comment has been minimized.

Copy link
@Bogdan-G

Bogdan-G Jun 28, 2017

For whom is this message? It will not write to the log, only the console, for example, the dev environment eclipse. A normal user does not often have a console in the launcher, but in the forge-log these two lines will not be mentioned at all - hence the fact that people may not notice the message and not report it.

This comment has been minimized.

Copy link
@Corosauce

Corosauce Jul 1, 2017

Author Owner

fml client latest log gets it, it stores console output.

This comment has been minimized.

Copy link
@Corosauce

Corosauce Jul 1, 2017

Author Owner

But yeah my method of logging has always been terrible and i should actually use proper logging levels via log4j

This comment has been minimized.

Copy link
@Bogdan-G

Bogdan-G Jul 1, 2017

fml client latest log gets it, it stores console output.

nope, i tested, does not write, OS win7x64 ultimate sp1 + mc1710 forge 1614. In my case helps if you send a message to the fml logger(cpw.mods.fml.common.FMLLog.<...>(<...>)). If custom log4j logger - no write, as an example - custom logger in UBC mod, print in console, but not save in fml log. Somewhere in the forge code there is a hint that should be intercepted, but it does not happen, I was also told that the launcher log can be intercepted, as and console IDE.

PS This is also true for ex.printStackTrace();

ex.printStackTrace();
//Weather.dbg("Warning, Weather2 client received packet before it was ready to use, and failed to init client weather due to null world");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/weather2/Weather.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import cpw.mods.fml.common.network.NetworkRegistry;

//@NetworkMod(channels = { "WeatherData", "EZGuiData" }, clientSideRequired = true, serverSideRequired = true, packetHandler = WeatherPacketHandler.class)
@Mod(modid = "weather2", name="weather2", version="v2.3.17")
@Mod(modid = "weather2", name="weather2", version="v2.3.18")
public class Weather {

@Mod.Instance( value = "weather2" )
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/weather2/client/SceneEnhancer.java
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@ public static float getRainStrengthAndControlVisuals(EntityPlayer entP, boolean
StormObject storm = null;

ClientTickHandler.checkClientWeather();

if (ClientTickHandler.weatherManager == null) return 0;

storm = ClientTickHandler.weatherManager.getClosestStorm(plPos, maxStormDist, StormObject.STATE_FORMING, true);

Expand Down
70 changes: 70 additions & 0 deletions weather2_1.7.10.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Gradle: :forgeSrc:1.7.10-10.13.0.1180" level="project" />
<orderEntry type="library" name="Gradle: com.google.code.gson:gson:2.2.4" level="project" />
<orderEntry type="library" name="Gradle: com.google.guava:guava:17.0" level="project" />
<orderEntry type="library" name="Gradle: com.ibm.icu:icu4j-core-mojang:51.2" level="project" />
<orderEntry type="library" name="Gradle: com.mojang:authlib:1.5.16" level="project" />
<orderEntry type="library" name="Gradle: com.mojang:realms:1.3.1" level="project" />
<orderEntry type="library" name="Gradle: com.paulscode:codecjorbis:20101023" level="project" />
<orderEntry type="library" name="Gradle: com.paulscode:codecwav:20101023" level="project" />
<orderEntry type="library" name="Gradle: com.paulscode:libraryjavasound:20101123" level="project" />
<orderEntry type="library" name="Gradle: com.paulscode:librarylwjglopenal:20100824" level="project" />
<orderEntry type="library" name="Gradle: com.paulscode:soundsystem:20120107" level="project" />
<orderEntry type="library" name="Gradle: com.typesafe.akka:akka-actor_2.11:2.3.3" level="project" />
<orderEntry type="library" name="Gradle: com.typesafe:config:1.2.1" level="project" />
<orderEntry type="library" name="Gradle: commons-codec:commons-codec:1.9" level="project" />
<orderEntry type="library" name="Gradle: commons-io:commons-io:2.4" level="project" />
<orderEntry type="library" name="Gradle: commons-logging:commons-logging:1.1.3" level="project" />
<orderEntry type="library" name="Gradle: io.netty:netty-all:4.0.10.Final" level="project" />
<orderEntry type="library" name="Gradle: java3d:vecmath:1.3.1" level="project" />
<orderEntry type="library" name="Gradle: lzma:lzma:0.0.1" level="project" />
<orderEntry type="library" name="Gradle: net.java.jinput:jinput-platform:2.0.5:natives-linux" level="project" />
<orderEntry type="library" name="Gradle: net.java.jinput:jinput-platform:2.0.5:natives-osx" level="project" />
<orderEntry type="library" name="Gradle: net.java.jinput:jinput-platform:2.0.5:natives-windows" level="project" />
<orderEntry type="library" name="Gradle: net.java.jinput:jinput:2.0.5" level="project" />
<orderEntry type="library" name="Gradle: net.java.jutils:jutils:1.0.0" level="project" />
<orderEntry type="library" name="Gradle: net.minecraft:launchwrapper:1.9" level="project" />
<orderEntry type="library" name="Gradle: net.sf.jopt-simple:jopt-simple:4.5" level="project" />
<orderEntry type="library" name="Gradle: net.sf.trove4j:trove4j:3.0.3" level="project" />
<orderEntry type="library" name="Gradle: org.apache.commons:commons-compress:1.8.1" level="project" />
<orderEntry type="library" name="Gradle: org.apache.commons:commons-lang3:3.3.2" level="project" />
<orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpclient:4.3.3" level="project" />
<orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpcore:4.3.2" level="project" />
<orderEntry type="library" name="Gradle: org.apache.logging.log4j:log4j-api:2.0-beta9" level="project" />
<orderEntry type="library" name="Gradle: org.apache.logging.log4j:log4j-core:2.0-beta9" level="project" />
<orderEntry type="library" name="Gradle: org.lwjgl.lwjgl:lwjgl-platform:2.9.1:natives-linux" level="project" />
<orderEntry type="library" name="Gradle: org.lwjgl.lwjgl:lwjgl-platform:2.9.1:natives-osx" level="project" />
<orderEntry type="library" name="Gradle: org.lwjgl.lwjgl:lwjgl-platform:2.9.1:natives-windows" level="project" />
<orderEntry type="library" name="Gradle: org.lwjgl.lwjgl:lwjgl:2.9.1" level="project" />
<orderEntry type="library" name="Gradle: org.lwjgl.lwjgl:lwjgl_util:2.9.1" level="project" />
<orderEntry type="library" name="Gradle: org.ow2.asm:asm-debug-all:4.1" level="project" />
<orderEntry type="library" name="Gradle: org.scala-lang.modules:scala-parser-combinators_2.11:1.0.1" level="project" />
<orderEntry type="library" name="Gradle: org.scala-lang.modules:scala-xml_2.11:1.0.2" level="project" />
<orderEntry type="library" name="Gradle: org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2" level="project" />
<orderEntry type="library" name="Gradle: org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2" level="project" />
<orderEntry type="library" name="Gradle: org.scala-lang:scala-actors-migration_2.11:1.1.0" level="project" />
<orderEntry type="library" name="Gradle: org.scala-lang:scala-actors:2.11.0" level="project" />
<orderEntry type="library" name="Gradle: org.scala-lang:scala-compiler:2.11.1" level="project" />
<orderEntry type="library" name="Gradle: org.scala-lang:scala-library:2.11.1" level="project" />
<orderEntry type="library" name="Gradle: org.scala-lang:scala-parser-combinators_2.11:1.0.1" level="project" />
<orderEntry type="library" name="Gradle: org.scala-lang:scala-reflect:2.11.1" level="project" />
<orderEntry type="library" name="Gradle: org.scala-lang:scala-swing_2.11:1.0.1" level="project" />
<orderEntry type="library" name="Gradle: org.scala-lang:scala-xml_2.11:1.0.2" level="project" />
<orderEntry type="library" name="Gradle: tv.twitch:twitch-external-platform:4.5:natives-windows-32" level="project" />
<orderEntry type="library" name="Gradle: tv.twitch:twitch-external-platform:4.5:natives-windows-64" level="project" />
<orderEntry type="library" name="Gradle: tv.twitch:twitch-platform:5.16:natives-osx" level="project" />
<orderEntry type="library" name="Gradle: tv.twitch:twitch-platform:5.16:natives-windows-32" level="project" />
<orderEntry type="library" name="Gradle: tv.twitch:twitch-platform:5.16:natives-windows-64" level="project" />
<orderEntry type="library" name="Gradle: tv.twitch:twitch:5.16" level="project" />
<orderEntry type="module" module-name="CoroUtil_1.7.10" />
</component>
</module>

0 comments on commit bdd9f93

Please sign in to comment.