Skip to content

Commit

Permalink
Update to MC 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Jun 25, 2023
1 parent 52fcd1d commit 39df3b9
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 41 deletions.
33 changes: 13 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
// For those who want the bleeding edge
buildscript {
repositories {
mavenCentral()
maven { url = 'https://maven.minecraftforge.net' }
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
}
}

plugins {
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'com.github.kt3k.coveralls' version '2.12.0'
id 'com.diffplug.spotless' version '5.14.3'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.modrinth.minotaur' version '2.+'
}

Expand Down Expand Up @@ -184,6 +174,7 @@ else
version = "${project.minecraft_version}-${project.mod_version}-${build_number}"

jar {
archiveClassifier.set('slim')
manifest {
attributes([
"Specification-Title": "${project.name}",
Expand All @@ -196,7 +187,6 @@ jar {
])
}
}
jar.finalizedBy('reobfShadowJar')

task signJar(type: SignJar, dependsOn: jar) {
onlyIf {
Expand All @@ -214,7 +204,7 @@ build.dependsOn signJar

task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
archiveClassifier.set('deobf')
manifest {
attributes([
"Specification-Title": "${project.name}",
Expand Down Expand Up @@ -242,18 +232,21 @@ task javadocJar(type: Jar, dependsOn: javadoc) {

shadowJar {
configurations = [project.configurations.shadow]
classifier '' // Replace the default JAR
archiveClassifier.set(''); // Replace the default JAR
// To avoid clashes with other mods
relocate 'io.netty.handler.codec.http', 'org.cyclops.integratedrest.vendors.io.netty.handler.codec.http'
relocate 'io.netty.handler.codec.rtsp', 'org.cyclops.integratedrest.vendors.io.netty.handler.codec.rtsp'
relocate 'io.netty.handler.codec.spdy', 'org.cyclops.integratedrest.vendors.io.netty.handler.codec.spdy'
finalizedBy 'reobfShadowJar'
}

assemble.dependsOn shadowJar
reobf {
shadowJar {} // Reobfuscate the shadowed JAR
}

artifacts {
archives shadowJar
archives deobfJar
archives sourcesJar
archives javadocJar
Expand All @@ -270,7 +263,7 @@ curseforge {
id = "284332" // my project url is http://minecraft.curseforge.com/mc-mods/284332/
releaseType = project.project.release_type
addGameVersion project.minecraft_version
mainArtifact(jar) {
mainArtifact(shadowJar) {
relations {
requiredDependency 'cyclops-core'
requiredDependency 'integrated-dynamics'
Expand Down Expand Up @@ -299,7 +292,7 @@ modrinth {
projectId = "ovubcV3F"
versionNumber = project.minecraft_version + '-' + project.mod_version
versionType = project.release_type
uploadFile = jar
uploadFile = shadowJar
gameVersions = [ project.minecraft_version ]
changelog = ""
if (new File("resources/changelog/${project.version}.txt").exists()) {
Expand Down Expand Up @@ -338,7 +331,7 @@ publishing {

publications { PublicationContainer publicationContainer ->
publicationContainer.register("maven", MavenPublication) { MavenPublication publication ->
publication.artifacts = [jar, javadocJar, deobfJar, sourcesJar]
publication.artifacts = [shadowJar, javadocJar, deobfJar, sourcesJar]
publication.artifactId = project.archivesBaseName.toLowerCase() // GH can't handle uppercase...
}
}
Expand All @@ -355,8 +348,8 @@ idea {

jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
xml.required = true
html.required = true
}
}

Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
mod_version=1.1.10
minecraft_version=1.19.4
forge_version=45.0.50
cyclopscore_version=1.18.2-309
integrateddynamics_version=1.19.4-1.16.4-557
minecraft_version=1.20.1
forge_version=47.0.1
cyclopscore_version=1.18.4-340
integrateddynamics_version=1.20.1-1.16.7-575
release_type=release
fingerprint=bd0353b3e8a2810d60dd584e256e364bc3bedd44

commoncapabilities_version=1.19.4-2.9.0-92
commoncapabilities_version=1.20.1-2.9.0-98

# Workaround for Spotless bug
# https://github.com/diffplug/spotless/issues/834
Expand Down
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
13 changes: 13 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven {
name = 'MinecraftForge'
url = 'https://maven.minecraftforge.net/'
}
}
}

plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;
import org.cyclops.cyclopscore.config.extendedconfig.BlockConfig;
import org.cyclops.integrateddynamics.item.ItemBlockProxy;
import org.cyclops.integratedrest.IntegratedRest;
Expand All @@ -18,7 +17,7 @@ public BlockHttpConfig() {
super(
IntegratedRest._instance,
"http",
eConfig -> new BlockHttp(Block.Properties.of(Material.HEAVY_METAL)
eConfig -> new BlockHttp(Block.Properties.of()
.strength(5.0F)
.sound(SoundType.METAL)),
(eConfig, block) -> new ItemBlockProxy(block, new Item.Properties())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.cyclops.integratedrest.client.gui;

import com.google.common.collect.Lists;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
Expand Down Expand Up @@ -71,9 +71,9 @@ public void init() {
}

@Override
protected void renderBg(PoseStack matrixStack, float partialTicks, int mouseX, int mouseY) {
super.renderBg(matrixStack, partialTicks, mouseX, mouseY);
valueTypeSelector.render(matrixStack, mouseX, mouseY, partialTicks);
protected void renderBg(GuiGraphics guiGraphics, float partialTicks, int mouseX, int mouseY) {
super.renderBg(guiGraphics, partialTicks, mouseX, mouseY);
valueTypeSelector.render(guiGraphics, mouseX, mouseY, partialTicks);
}

@Override
Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
modLoader="javafml"
loaderVersion="[45,)"
loaderVersion="[47,)"
issueTrackerURL="https://github.com/CyclopsMC/IntegratedREST/issues"
displayURL="https://www.curseforge.com/minecraft/mc-mods/integrated-rest"
license="MIT"
Expand All @@ -16,30 +16,30 @@ Expose Integrated Dynamics networks as a REST API.
[[dependencies.integratedrest]]
modId="cyclopscore"
mandatory=true
versionRange="[1.18.2,)"
versionRange="[1.18.4,)"
ordering="NONE"
side="BOTH"
[[dependencies.integratedrest]]
modId="commoncapabilities"
mandatory=true
versionRange="[2.8.3,)"
versionRange="[2.9.0,)"
ordering="NONE"
side="BOTH"
[[dependencies.integratedrest]]
modId="integrateddynamics"
mandatory=true
versionRange="[1.16.4,)"
versionRange="[1.16.7,)"
ordering="NONE"
side="BOTH"
[[dependencies.integratedrest]]
modId="forge"
mandatory=true
versionRange="[45.0.50,)"
versionRange="[47.0.1,)"
ordering="NONE"
side="BOTH"
[[dependencies.integratedrest]]
modId="minecraft"
mandatory=true
versionRange="[1.19.4,]"
versionRange="[1.20.1,]"
ordering="NONE"
side="BOTH"
6 changes: 3 additions & 3 deletions src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"pack": {
"description": "integratedrest resources",
"pack_format": 12,
"forge:resource_pack_format": 12,
"forge:data_pack_format": 10
"pack_format": 15,
"forge:resource_pack_format": 15,
"forge:data_pack_format": 15
}
}

0 comments on commit 39df3b9

Please sign in to comment.