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 { stages {
/* This resets the checkout on jenkins, but doesn't take branch into account...
stage('fetch') { stage('fetch') {
steps { steps {
checkout scm checkout scm
} }
} }
*/
stage('notify_start') { stage('notify_start') {
when { when {
not { not {

View file

@ -52,6 +52,8 @@ plugins {
} }
apply plugin: 'eclipse' apply plugin: 'eclipse'
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version'))
ext { ext {
JAR_SIGNER = null JAR_SIGNER = null
if (project.hasProperty('keystore')) { if (project.hasProperty('keystore')) {
@ -64,7 +66,7 @@ ext {
MAPPING_CHANNEL = 'snapshot' MAPPING_CHANNEL = 'snapshot'
MAPPING_VERSION = '20200225-1.15.1' MAPPING_VERSION = '20200225-1.15.1'
MC_VERSION = '1.15.2' MC_VERSION = '1.15.2'
MCP_VERSION = '20200122.131323' MCP_VERSION = '20200307.202953'
} }
project(':mcp') { project(':mcp') {
@ -1316,12 +1318,18 @@ def getArtifacts(project, config, classifiers) {
} }
def checkExists(url) { def checkExists(url) {
def code = new URL(url).openConnection().with { try {
requestMethod = 'HEAD' def code = new URL(url).openConnection().with {
connect() requestMethod = 'HEAD'
responseCode 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) { def getClasspath(project, libs, artifact) {

View file

@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists 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.LootParameters;
import net.minecraft.world.storage.loot.LootTable; import net.minecraft.world.storage.loot.LootTable;
import net.minecraft.world.storage.loot.conditions.ILootCondition; 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.common.loot.LootModifier;
import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
@ -53,7 +53,7 @@ public class GlobalLootModifiersTest {
} }
@SubscribeEvent @SubscribeEvent
public static void registerModifierSerializers(@Nonnull final RegistryEvent.Register<IGlobalLootModifierSerializer<?>> event) { public static void registerModifierSerializers(@Nonnull final RegistryEvent.Register<GlobalLootModifierSerializer<?>> event) {
if (ENABLE) { if (ENABLE) {
event.getRegistry().register( event.getRegistry().register(
new WheatSeedsConverterModifier.Serializer().setRegistryName(new ResourceLocation(MODID,"wheat_harvest")) new WheatSeedsConverterModifier.Serializer().setRegistryName(new ResourceLocation(MODID,"wheat_harvest"))
@ -95,7 +95,7 @@ public class GlobalLootModifiersTest {
.orElse(stack); .orElse(stack);
} }
private static class Serializer extends LootModifier.Serializer<SmeltingEnchantmentModifier> { private static class Serializer extends GlobalLootModifierSerializer<SmeltingEnchantmentModifier> {
@Override @Override
public SmeltingEnchantmentModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) { public SmeltingEnchantmentModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) {
return new SmeltingEnchantmentModifier(conditionsIn); return new SmeltingEnchantmentModifier(conditionsIn);
@ -127,7 +127,7 @@ public class GlobalLootModifiersTest {
return loottable.generate(ctx); return loottable.generate(ctx);
} }
private static class Serializer extends LootModifier.Serializer<SilkTouchTestModifier> { private static class Serializer extends GlobalLootModifierSerializer<SilkTouchTestModifier> {
@Override @Override
public SilkTouchTestModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) { public SilkTouchTestModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) {
return new SilkTouchTestModifier(conditionsIn); return new SilkTouchTestModifier(conditionsIn);
@ -173,7 +173,7 @@ public class GlobalLootModifiersTest {
return generatedLoot; return generatedLoot;
} }
private static class Serializer extends LootModifier.Serializer<WheatSeedsConverterModifier> { private static class Serializer extends GlobalLootModifierSerializer<WheatSeedsConverterModifier> {
@Override @Override
public WheatSeedsConverterModifier read(ResourceLocation name, JsonObject object, ILootCondition[] conditionsIn) { public WheatSeedsConverterModifier read(ResourceLocation name, JsonObject object, ILootCondition[] conditionsIn) {