Skip to content

Commit

Permalink
Merge pull request #2 from hea3ven/master
Browse files Browse the repository at this point in the history
Update to Minecraft 1.9.4
  • Loading branch information
ljfa-ag committed Jun 6, 2016
2 parents 84bb691 + 6183049 commit e2baa01
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
}
}

Expand All @@ -19,14 +19,13 @@ apply plugin: 'net.minecraftforge.gradle.forge'

version = "1.2"
group= "ljfa.tntutils"
archivesBaseName = "tnt_utilities-mc1.9"
archivesBaseName = "tnt_utilities-mc1.9.4"

sourceCompatibility = '1.7'
targetCompatibility = '1.7'

jar {
manifest {
attributes 'FMLCorePlugin': 'ljfa.tntutils.asm.TntuPlugin'
attributes 'FMLCorePluginContainsFMLMod': 'true'
attributes 'FMLAT': 'tntutils_at.cfg'
}
Expand All @@ -43,16 +42,18 @@ curseforge {
}

minecraft {
version = "1.9-12.16.1.1887"
version = "1.9.4-12.17.0.1954"
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_20160312"
mappings = "snapshot_20160605"
makeObfSourceJar = false

coreMod 'ljfa.tntutils.asm.TntuPlugin'

replaceIn "Reference.java"
replace "@VERSION@", project.version
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/ljfa/tntutils/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public static void createBlacklistSet() {
metamask = 0xFFFF;
}

Block block = Block.blockRegistry.getObject(new ResourceLocation(blockname));
if(block == Blocks.air || block == null)
Block block = Block.REGISTRY.getObject(new ResourceLocation(blockname));
if(block == Blocks.AIR || block == null)
throw new InvalidConfigValueException("destructionBlackOrWhitelist: Invalid block name: " + blockname);

if(!blackWhiteList.containsKey(block))
Expand All @@ -134,8 +134,8 @@ public static void modifyResistances() {
String blockName = str.substring(0, ind);
String valueStr = str.substring(ind+1);

Block block = Block.blockRegistry.getObject(new ResourceLocation(blockName));
if(block == Blocks.air || block == null)
Block block = Block.REGISTRY.getObject(new ResourceLocation(blockName));
if(block == Blocks.AIR || block == null)
throw new InvalidConfigValueException("blockResistances: Invalid block name: " + blockName);

try {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ljfa/tntutils/asm/TntuPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions;

@Name("TNTUtilities Core")
@MCVersion("1.9")
@MCVersion("1.9.4")
@SortingIndex(1100)
@TransformerExclusions("ljfa.tntutils")
public class TntuPlugin implements IFMLLoadingPlugin {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ljfa/tntutils/command/CommandExplosion.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args

Entity source = (sender instanceof Entity) ? (Entity)sender : null;

world.newExplosion(source, xArg.func_179628_a(), yArg.func_179628_a(), zArg.func_179628_a(), strength, fire, blockDmg);
world.newExplosion(source, xArg.getResult(), yArg.getResult(), zArg.getResult(), strength, fire, blockDmg);
}

}
6 changes: 3 additions & 3 deletions src/main/java/ljfa/tntutils/handlers/EntityJoinHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public void onEntityJoin(EntityJoinWorldEvent event) {
Entity ent = event.getEntity();
if(Config.disableTNT && ent instanceof EntityTNTPrimed) {
event.setCanceled(true);
event.getWorld().spawnEntityInWorld(new EntityItem(event.getWorld(), ent.posX, ent.posY, ent.posZ, new ItemStack(Blocks.tnt)));
event.getWorld().spawnEntityInWorld(new EntityItem(event.getWorld(), ent.posX, ent.posY, ent.posZ, new ItemStack(Blocks.TNT)));
}
else if(Config.disableTNTMinecart && ent instanceof EntityMinecartTNT) {
event.setCanceled(true);
event.getWorld().spawnEntityInWorld(new EntityItem(event.getWorld(), ent.posX, ent.posY, ent.posZ, new ItemStack(Blocks.tnt)));
event.getWorld().spawnEntityInWorld(new EntityItem(event.getWorld(), ent.posX, ent.posY, ent.posZ, new ItemStack(Items.minecart)));
event.getWorld().spawnEntityInWorld(new EntityItem(event.getWorld(), ent.posX, ent.posY, ent.posZ, new ItemStack(Blocks.TNT)));
event.getWorld().spawnEntityInWorld(new EntityItem(event.getWorld(), ent.posX, ent.posY, ent.posZ, new ItemStack(Items.MINECART)));
}
}
}

0 comments on commit e2baa01

Please sign in to comment.