Skip to content

Commit

Permalink
A surprisingly painless update to Minecraft 1.15.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LemmaEOF committed May 15, 2020
1 parent 62e84dc commit 9f21cd9
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 61 deletions.
83 changes: 30 additions & 53 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,60 +1,40 @@
buildscript {
repositories {
jcenter()
maven {
name = 'Fabric'
url = 'http://maven.modmuss50.me/'
}
}
dependencies {
classpath "net.fabricmc:fabric-loom:0.2.4-SNAPSHOT"
}
}

plugins {
id 'java'
id 'eclipse'
id 'idea'
id 'maven-publish'
id "com.jfrog.artifactory" version "4.9.0"
id "fabric-loom" version "0.2.7-SNAPSHOT"
id "maven-publish"
id "com.jfrog.artifactory" version "4.15.2"
}

apply plugin: net.fabricmc.loom.LoomGradlePlugin

sourceCompatibility = 1.8
targetCompatibility = 1.8

if(rootProject.file('private.gradle').exists()) { //Publishing details
apply from: 'private.gradle'
if(rootProject.file("private.gradle").exists()) { //Publishing details
apply from: "private.gradle"
}

archivesBaseName = "dynagear"
group = "io.github.cottonmc"
version = "1.3.4+1.14.4"
archivesBaseName = "${project.archives_base_name}"
group = "${project.maven_group}"
version = "${project.mod_version}+${project.minecraft_version}"

minecraft {
}

repositories {
mavenCentral()
maven { url "http://server.bbkr.space:8081/artifactory/libs-release" }
maven { url "https://maven.swordglowsblue.com" }
jcenter() // JCenter - home of Artifice
maven { url "https://server.bbkr.space/artifactory/libs-release" } // Cotton maven - home of Cotton projects
maven { url "https://maven.abusedmaster.xyz" } // NerdHub maven - home of Cardinal Components
}

dependencies {
minecraft "com.mojang:minecraft:1.14.4"
mappings "net.fabricmc:yarn:1.14.4+build.9"
modImplementation "net.fabricmc:fabric-loader:0.4.8+build.159"
modImplementation "net.fabricmc.fabric-api:fabric-api:0.3.0+build.207"
implementation "com.google.code.findbugs:jsr305:3.0.2"

modImplementation ("io.github.cottonmc:cotton-resources:1.4.1+1.14.4") { exclude(group: 'me.shedaniel', module: 'RoughlyEnoughItems') }
modImplementation "io.github.cottonmc:LibCD:1.3.1+1.14.4"
modImplementation "io.github.cottonmc.cotton:cotton:1.0.0-rc.2"

modImplementation "io.github.cottonmc:Jankson:1.0.0+j1.1.2"
include "io.github.cottonmc:Jankson:1.0.0+j1.1.2"
modImplementation "artificemc:artifice:0.3.4"
include "artificemc:artifice:0.3.4"
modImplementation "io.github.cottonmc:StaticData:1.1.2"
include "io.github.cottonmc:StaticData:1.1.2"
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.minecraft_version}+build.${project.yarn_build}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
compileOnly "com.google.code.findbugs:jsr305:3.0.2"

modImplementation "io.github.cottonmc:StaticData:${project.static_data_version}"
modImplementation "io.github.cottonmc:Jankson-Fabric:${project.jankson_version}"
modImplementation "com.lettuce.fudge:artifice:${project.artifice_version}"
modRuntime ("io.github.cottonmc:cotton-resources:${project.cotton_resources_version}") { exclude(group: 'me.shedaniel', module: 'RoughlyEnoughItems') }
}

processResources {
Expand All @@ -79,7 +59,7 @@ tasks.withType(JavaCompile) {
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
archiveClassifier = "sources"
from sourceSets.main.allSource
}

Expand All @@ -92,18 +72,15 @@ publishing {
publications {
maven(MavenPublication) {
// add all the jars that should be included when publishing to maven
//artifact(jar) {
// builtBy remapJar
//}
artifact ("${project.buildDir.absolutePath}/libs/${archivesBaseName}-${project.version}.jar") { //release jar - file location not provided anywhere in loom
artifact(remapJar) {
classifier null
builtBy remapJar
}

artifact ("${project.buildDir.absolutePath}/libs/${archivesBaseName}-${project.version}-dev.jar") { //release jar - file location not provided anywhere in loom
/*artifact ("${project.buildDir.absolutePath}/libs/${archivesBaseName}-${project.version}-dev.jar") { //release jar - file location not provided anywhere in loom
classifier "dev"
builtBy remapJar
}
}*/

artifact(sourcesJar) {
builtBy remapSourcesJar
Expand All @@ -120,7 +97,7 @@ publishing {

artifactory {
if (project.hasProperty("artifactoryUsername")) {
contextUrl = "http://server.bbkr.space:8081/artifactory/"
contextUrl = "https://server.bbkr.space/artifactory/"
publish {
repository {
if (version.contains("SNAPSHOT")) {
Expand All @@ -142,4 +119,4 @@ artifactory {
} else {
println "Cannot configure artifactory; please define ext.artifactoryUsername and ext.artifactoryPassword before running artifactoryPublish"
}
}
}
21 changes: 21 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.15.2
yarn_build=15
loader_version=0.8.3+build.196

# Mod Properties
mod_version = 1.0.0
maven_group = io.github.cottonmc
archives_base_name = starter

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.10.8+build.310-1.15
cotton_resources_version=1.5.1+1.15.2
static_data_version=1.1.2
jankson_version=2.0.1+j1.2.0
artifice_version=0.6.1+1.15.2
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
10 changes: 10 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pluginManagement {
repositories {
jcenter()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
gradlePluginPortal()
}
}
5 changes: 3 additions & 2 deletions src/main/java/io/github/cottonmc/dynagear/DynaGear.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package io.github.cottonmc.dynagear;


import com.swordglowsblue.artifice.api.Artifice;
import com.swordglowsblue.artifice.api.ArtificeResourcePack;
import com.swordglowsblue.artifice.api.builder.data.recipe.ShapedRecipeBuilder;
import com.swordglowsblue.artifice.api.util.Processor;
import com.swordglowsblue.artifice.common.ArtificeRegistry;
import io.github.cottonmc.dynagear.api.*;
import io.github.cottonmc.dynagear.impl.EquipmentManager;
import io.github.cottonmc.dynagear.impl.MaterialManager;
Expand Down Expand Up @@ -67,7 +68,7 @@ public void onInitialize() {
if (FabricLoader.getInstance().isDevelopmentEnvironment()) {
String path = FabricLoader.getInstance().getGameDirectory().toPath().resolve("dynagear_export").toString();
try {
Artifice.DATA.get(new Identifier(MODID, "dynagear_data")).dumpResources(path);
((ArtificeResourcePack)ArtificeRegistry.DATA.get(new Identifier(MODID, "dynagear_data"))).dumpResources(path);
} catch (IOException e) {
logger.warn("[DynaGear] Couldn't dump data packs!");
}
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/io/github/cottonmc/dynagear/DynaGearClient.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package io.github.cottonmc.dynagear;

import com.swordglowsblue.artifice.api.Artifice;
import com.swordglowsblue.artifice.api.ArtificeResourcePack;
import com.swordglowsblue.artifice.api.builder.assets.ModelBuilder;
import com.swordglowsblue.artifice.api.util.Processor;
import com.swordglowsblue.artifice.common.ArtificeRegistry;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.impl.client.render.ColorProviderRegistryImpl;
import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.item.ItemConvertible;
import net.minecraft.util.Identifier;
Expand Down Expand Up @@ -34,14 +37,14 @@ public void onInitializeClient() {
if (FabricLoader.getInstance().isDevelopmentEnvironment()) {
String path = FabricLoader.getInstance().getGameDirectory().toPath().resolve("dynagear_export").toString();
try {
Artifice.ASSETS.get(new Identifier(DynaGear.MODID, "dynagear_assets")).dumpResources(path);
((ArtificeResourcePack)ArtificeRegistry.ASSETS.get(new Identifier(DynaGear.MODID, "dynagear_assets"))).dumpResources(path);
} catch (IOException e) {
DynaGear.logger.warn("Couldn't dump resource packs!!");
}
}
for (Identifier id : DynaGear.EQUIPMENT.getIds()) {
EquipmentSet set = DynaGear.EQUIPMENT.get(id);
ColorProviderRegistryImpl.ITEM.register((stack, layer) -> {
ColorProviderRegistry.ITEM.register((stack, layer) -> {
if (layer == 0) return set.getMaterial().getColor();
else return -1;
}, set.getAll().toArray(new ItemConvertible[]{}));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.cottonmc.dynagear;

import blue.endless.jankson.*;
import blue.endless.jankson.impl.SyntaxError;
import blue.endless.jankson.api.SyntaxError;
import io.github.cottonmc.dynagear.api.ConfiguredMaterial;
import io.github.cottonmc.jankson.JanksonFactory;
import io.github.cottonmc.staticdata.StaticData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.github.cottonmc.dynagear.api.ConfiguredMaterial;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.DyeableArmorItem;
import net.minecraft.item.ItemStack;
import net.minecraft.text.Text;
Expand Down

0 comments on commit 9f21cd9

Please sign in to comment.