From a83fe44d8a90b4db18b162a2e249eeca22cd7b92 Mon Sep 17 00:00:00 2001 From: LexManos Date: Sun, 6 Mar 2016 18:02:44 -0800 Subject: [PATCH] Temporary hack to fix MCP mappings for param names we are using that is causing compile errors. --- build.gradle | 12 +++++++++++ .../projectile/EntityFishHook.java.patch.rej | 21 ------------------- 2 files changed, 12 insertions(+), 21 deletions(-) delete mode 100644 rejects/minecraft/net/minecraft/entity/projectile/EntityFishHook.java.patch.rej diff --git a/build.gradle b/build.gradle index cf8043dae..db62cdfb5 100644 --- a/build.gradle +++ b/build.gradle @@ -374,3 +374,15 @@ String getVersionFromJava(File file) // should be remvoed, and the jenkisn fixed when no longer building with FG 1.2 task setupForge { dependsOn 'setup' } task buildPackages { dependsOn 'build' } + +//Temporary hack to fix compile errors caused by 1.8.9 mappings on 1.9 +task fixParams << { + logger.lifecycle('Fixing param names!') + def params = new File(extractMcpMappings.destinationDir, 'params.csv') + def text = params.text + text = text.replaceAll('p_150893_2_,block,', 'p_150893_2_,state,') + text = text.replaceAll('p_148611_1_,sound,', 'p_148611_1_,p_sound,') + params.write(text) +} +fixParams.dependsOn('extractMcpMappings') +extractMcpMappings.finalizedBy('fixParams') diff --git a/rejects/minecraft/net/minecraft/entity/projectile/EntityFishHook.java.patch.rej b/rejects/minecraft/net/minecraft/entity/projectile/EntityFishHook.java.patch.rej deleted file mode 100644 index c55c19e5d..000000000 --- a/rejects/minecraft/net/minecraft/entity/projectile/EntityFishHook.java.patch.rej +++ /dev/null @@ -1,21 +0,0 @@ -++++ REJECTED PATCH 1 - } - } - -+ @SuppressWarnings("unused") - private ItemStack getFishingResult() - { - float f = this.worldObj.rand.nextFloat(); - int i = EnchantmentHelper.getLuckOfSeaModifier(this.angler); - int j = EnchantmentHelper.getLureModifier(this.angler); -+ -+ if (true) -+ { -+ this.angler.addStat(net.minecraftforge.common.FishingHooks.getFishableCategory(f, i, j).stat, 1); -+ return net.minecraftforge.common.FishingHooks.getRandomFishable(this.rand, f, i, j); -+ } -+ - float f1 = 0.1F - (float)i * 0.025F - (float)j * 0.01F; - float f2 = 0.05F + (float)i * 0.01F - (float)j * 0.01F; - f1 = MathHelper.clamp_float(f1, 0.0F, 1.0F); -++++ END PATCH