Update gradle wrapper

Update MCPConfig to version that bypasses javac compiler bugs
Fix Global loot test compile errors.
This commit is contained in:
LexManos 2020-03-15 13:55:03 -07:00
parent c7a17946a5
commit 23541ab175
4 changed files with 23 additions and 13 deletions

2
Jenkinsfile vendored
View File

@ -18,11 +18,13 @@ pipeline {
}
stages {
/* This resets the checkout on jenkins, but doesn't take branch into account...
stage('fetch') {
steps {
checkout scm
}
}
*/
stage('notify_start') {
when {
not {

View File

@ -52,6 +52,8 @@ plugins {
}
apply plugin: 'eclipse'
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version'))
ext {
JAR_SIGNER = null
if (project.hasProperty('keystore')) {
@ -64,7 +66,7 @@ ext {
MAPPING_CHANNEL = 'snapshot'
MAPPING_VERSION = '20200225-1.15.1'
MC_VERSION = '1.15.2'
MCP_VERSION = '20200122.131323'
MCP_VERSION = '20200307.202953'
}
project(':mcp') {
@ -1316,12 +1318,18 @@ def getArtifacts(project, config, classifiers) {
}
def checkExists(url) {
def code = new URL(url).openConnection().with {
requestMethod = 'HEAD'
connect()
responseCode
try {
def code = new URL(url).openConnection().with {
requestMethod = 'HEAD'
connect()
responseCode
}
return code == 200
} catch (Exception e) {
if (e.toString().contains('unable to find valid certification path to requested target'))
throw new RuntimeException('Failed to connect to ' + url + ': Missing certificate root authority, try updating java')
throw e
}
return code == 200
}
def getClasspath(project, libs, artifact) {

View File

@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip

View File

@ -25,7 +25,7 @@ import net.minecraft.world.storage.loot.LootParameterSets;
import net.minecraft.world.storage.loot.LootParameters;
import net.minecraft.world.storage.loot.LootTable;
import net.minecraft.world.storage.loot.conditions.ILootCondition;
import net.minecraftforge.common.loot.IGlobalLootModifierSerializer;
import net.minecraftforge.common.loot.GlobalLootModifierSerializer;
import net.minecraftforge.common.loot.LootModifier;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@ -53,7 +53,7 @@ public class GlobalLootModifiersTest {
}
@SubscribeEvent
public static void registerModifierSerializers(@Nonnull final RegistryEvent.Register<IGlobalLootModifierSerializer<?>> event) {
public static void registerModifierSerializers(@Nonnull final RegistryEvent.Register<GlobalLootModifierSerializer<?>> event) {
if (ENABLE) {
event.getRegistry().register(
new WheatSeedsConverterModifier.Serializer().setRegistryName(new ResourceLocation(MODID,"wheat_harvest"))
@ -95,7 +95,7 @@ public class GlobalLootModifiersTest {
.orElse(stack);
}
private static class Serializer extends LootModifier.Serializer<SmeltingEnchantmentModifier> {
private static class Serializer extends GlobalLootModifierSerializer<SmeltingEnchantmentModifier> {
@Override
public SmeltingEnchantmentModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) {
return new SmeltingEnchantmentModifier(conditionsIn);
@ -127,7 +127,7 @@ public class GlobalLootModifiersTest {
return loottable.generate(ctx);
}
private static class Serializer extends LootModifier.Serializer<SilkTouchTestModifier> {
private static class Serializer extends GlobalLootModifierSerializer<SilkTouchTestModifier> {
@Override
public SilkTouchTestModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) {
return new SilkTouchTestModifier(conditionsIn);
@ -137,7 +137,7 @@ public class GlobalLootModifiersTest {
/**
* When harvesting wheat with shears, this modifier is invoked via the wheat_harvest loot_modifier json<br/>
* This modifier checks how many seeds were harvested and turns X seeds into Y wheat (3:1)
* This modifier checks how many seeds were harvested and turns X seeds into Y wheat (3:1)
*
*/
private static class WheatSeedsConverterModifier extends LootModifier {
@ -173,7 +173,7 @@ public class GlobalLootModifiersTest {
return generatedLoot;
}
private static class Serializer extends LootModifier.Serializer<WheatSeedsConverterModifier> {
private static class Serializer extends GlobalLootModifierSerializer<WheatSeedsConverterModifier> {
@Override
public WheatSeedsConverterModifier read(ResourceLocation name, JsonObject object, ILootCondition[] conditionsIn) {