Skip to content

Commit

Permalink
Bump to 0.4.2: Prevent crash when outside of world, make compatible w…
Browse files Browse the repository at this point in the history
…ith Java 6
  • Loading branch information
maruohon committed Jun 15, 2016
1 parent d64ca5b commit e3824c0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ buildscript {

apply plugin: 'net.minecraftforge.gradle.forge'

sourceCompatibility = 1.6
targetCompatibility = 1.6

ext.configFile = file "build.properties"

configFile.withReader {
Expand Down
6 changes: 3 additions & 3 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Thu Jan 14 08:33:00 EET 2016
group = fi.dy.masa
mod_id = minihud
mod_version = 0.4.1
mod_version = 0.4.2

minecraft_version = 1.9.4
forge_version = 12.17.0.1909-1.9.4
mappings_version = snapshot_20160520
forge_version = 12.17.0.1950
mappings_version = snapshot_20160604
2 changes: 1 addition & 1 deletion src/main/java/fi/dy/masa/minihud/config/Configs.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private static int getColor(String colorStr, int defaultColor)

if (matcher.matches())
{
try { return Integer.parseUnsignedInt(matcher.group(1), 16); }
try { return Integer.parseInt(matcher.group(1), 16); }
catch (NumberFormatException e) { return defaultColor; }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ private void getLines(List<StringHolder> lines, int enabledMask)

if ((enabledMask & (MASK_BIOME | MASK_LIGHT)) != 0)
{
if (this.mc.theWorld.isBlockLoaded(pos) == true)
// Prevent a crash when outside of world
if (pos.getY() >= 0 && pos.getY() < 256 && this.mc.theWorld.isBlockLoaded(pos) == true)
{
Chunk chunk = this.mc.theWorld.getChunkFromBlockCoords(pos);

Expand Down
1 change: 1 addition & 0 deletions update.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"1.8.9-recommended": "0.4.0"
},
"1.9.4": {
"0.4.2": "Prevent a crash when outside of the world (like in the void)\nFix compatibility with Java versions before 8",
"0.4.1": "Strip extra stuff from the end of the entity count line",
"0.4.0": "Add parsing the colors from hex format\nAdd individual toggle options for the information types\nSome configs changed because of this, delete your old config!!",
"0.3.0": "Add entity count as an available information type\nAdd config option to sort the lines by their length\nAdd a config option to change the coordinate line's formatting",
Expand Down

0 comments on commit e3824c0

Please sign in to comment.