Skip to content

Commit

Permalink
Update to 1.8.9
Browse files Browse the repository at this point in the history
  • Loading branch information
SoniEx2 committed Jan 3, 2016
1 parent f31e140 commit fec622d
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 27 deletions.
27 changes: 13 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*
// For those who want the bleeding edge
buildscript {
repositories {
Expand All @@ -9,31 +8,32 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
*/

/*
// for people who want stable
plugins {
id "net.minecraftforge.gradle.forge" version "2.0.1"
}
*/

version = "0.2.1"
group= "com.github.soniex2.notebetter" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
version = "0.2.2"
group = "com.github.soniex2.notebetter" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "notebetter"

minecraft {
version = "1.8-11.14.3.1521"
version = "1.8.9-11.15.0.1674"
runDir = "run"

// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not allways work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "snapshot_20141130"
mappings = "snapshot_20160103"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}

Expand All @@ -49,7 +49,7 @@ dependencies {
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"

// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
Expand All @@ -68,20 +68,19 @@ dependencies {

}

processResources
{
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'

// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
expand 'version': project.version, 'mcversion': project.minecraft.version
}

// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/github/soniex2/notebetter/NoteBetter.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
import java.io.*;

@Mod(modid = NoteBetter.MODID, name = "NoteBetter", version = NoteBetter.VERSION,
acceptedMinecraftVersions = "1.8", acceptableRemoteVersions = "*",
acceptedMinecraftVersions = "1.8.*", acceptableRemoteVersions = "*",
guiFactory = "com.github.soniex2.notebetter.gui.NoteBetterGuiFactory")
public class NoteBetter {
public static final String MODID = "notebetter";
public static final String VERSION = "0.2.1";
public static final String VERSION = "0.2.2";

@Mod.Instance
public static NoteBetter instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* @author soniex2
*/
@IFMLLoadingPlugin.MCVersion("1.8")
@IFMLLoadingPlugin.TransformerExclusions("com.github.soniex2.notebetter")
@IFMLLoadingPlugin.SortingIndex(Integer.MAX_VALUE)
public class NoteBetterCore implements IFMLLoadingPlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static JsonArray getJsonArrayOrNull(JsonObject jsonObject, String key) {
if (jsonObject.isJsonNull()) {
return null;
}
return JsonUtils.getJsonElementAsJsonArray(jsonObject.get(key), key);
return JsonUtils.getJsonArray(jsonObject.get(key), key);
} else {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public NoteBetterInstrument getInstrumentForMaterial(@Nonnull Material material)
// We already have a ResourceLocation, this is faster.
Block b = null;
if (Block.blockRegistry.containsKey(blockName)) {
b = (Block) Block.blockRegistry.getObject(blockName);
b = Block.blockRegistry.getObject(blockName);
}
if (b != null && b.getMaterial() == material) {
return ms.getInstrument();
Expand All @@ -66,7 +66,7 @@ public NoteBetterInstrument getInstrumentForMaterial(@Nonnull Material material)
*/
@Nullable
public NoteBetterInstrument getInstrumentForBlock(@Nonnull Block block) {
ResourceLocation rl = (ResourceLocation) Block.blockRegistry.getNameForObject(block);
ResourceLocation rl = Block.blockRegistry.getNameForObject(block);
if (rl != null && blocks.containsKey(rl)) { // null check is an optimization
return blocks.get(rl);
}
Expand Down Expand Up @@ -120,7 +120,7 @@ private NoteBetterInstrument getInstrument(@Nonnull JsonElement jsonElement) {
} else {
throw new JsonSyntaxException("Invalid instrument: " + jsonElement);
}
volume = JsonUtils.getJsonObjectFloatFieldValueOrDefault(jsonObject, "volume", 3f);
volume = JsonUtils.getFloat(jsonObject, "volume", 3f);
} else if (jsonElement.isJsonNull()) {
name = null;
volume = 3f;
Expand All @@ -146,21 +146,21 @@ public Object deserialize(JsonElement json, Type typeOfT, JsonDeserializationCon
JsonArray materials = JsonHelper.getJsonArrayOrNull(jsonObject, "materials");
if (blocks != null) {
for (JsonElement element : blocks) {
JsonObject blockObject = JsonUtils.getElementAsJsonObject(element, "blocks");
String block = JsonUtils.getJsonObjectStringFieldValue(blockObject, "block");
JsonObject blockObject = JsonUtils.getJsonObject(element, "blocks");
String block = JsonUtils.getString(blockObject, "block");
JsonElement soundElement = blockObject.get("sound");
if (soundElement == null) throw new JsonSyntaxException("Invalid instrument");
config.blocks.put(new CachedResourceLocation(block), getInstrument(soundElement));
}
}
if (materials != null) {
for (JsonElement element : materials) {
JsonObject materialObject = JsonUtils.getElementAsJsonObject(element, "materials");
JsonObject materialObject = JsonUtils.getJsonObject(element, "materials");
String block;
if (materialObject.has("material_of")) {
block = JsonUtils.getJsonObjectStringFieldValue(materialObject, "material_of");
block = JsonUtils.getString(materialObject, "material_of");
} else {
block = JsonUtils.getJsonObjectStringFieldValue(materialObject, "material");
block = JsonUtils.getString(materialObject, "material");
}
JsonElement soundElement = materialObject.get("sound");
if (soundElement == null) throw new JsonSyntaxException("Invalid instrument");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected CachedResourceLocation(int p_i45928_1_, String... resourcePathIn) {
}

public CachedResourceLocation(@Nonnull String p_i1293_1_) {
this(0, func_177516_a(p_i1293_1_));
this(0, splitObjectName(p_i1293_1_));
}

public CachedResourceLocation(@Nonnull String p_i1292_1_, @Nonnull String p_i1292_2_) {
Expand Down

0 comments on commit fec622d

Please sign in to comment.