Temporary hack to fix MCP mappings for param names we are using that is causing compile errors.

This commit is contained in:
LexManos 2016-03-06 18:02:44 -08:00
parent 09bac53ed6
commit a83fe44d8a
2 changed files with 12 additions and 21 deletions

View File

@ -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')

View File

@ -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