Skip to content

Commit

Permalink
1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MORIMORI0317 committed Dec 17, 2022
1 parent f0eea1e commit 370f529
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ output/
bin/
libs/

.architectury-transformer

.classpath
.project
.idea/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.minecraft.server.packs.VanillaPackResources;
import net.minecraft.server.packs.resources.ResourceManager;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

Expand All @@ -24,7 +25,12 @@ protected TextureImage getTextureImage(ResourceManager resourceManager) {
Minecraft minecraft = Minecraft.getInstance();
VanillaPackResources vanillaPackResources = minecraft.getVanillaPackResources();

try (InputStream inputStream = vanillaPackResources.getResource(PackType.CLIENT_RESOURCES, location).get()) {
var ioSp = vanillaPackResources.getResource(PackType.CLIENT_RESOURCES, location);

if (ioSp == null)
return new TextureImage(new FileNotFoundException(location.toString()));

try (InputStream inputStream = ioSp.get()) {
return new TextureImage(new TextureMetadataSection(true, true), NativeImage.read(inputStream));
} catch (IOException ex) {
return new TextureImage(ex);
Expand Down
19 changes: 18 additions & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
id 'com.matthewprenger.cursegradle' version '1.4.0'
id "com.modrinth.minotaur" version "2.1.2"
id "com.modrinth.minotaur" version "2.4.4"
}

architectury {
Expand Down Expand Up @@ -127,4 +127,21 @@ if (System.getenv('modrinthapikey') != null && "${modrinth_id}" != '') {
gameVersions = List.of(project.support_versions.split(","))
loaders = ["fabric", "quilt"]
}
}

if (System.getenv('modrinthapikey') != null && "${project.modrinth_id}" != '') {
modrinth {
token = System.getenv('modrinthapikey')
projectId = "${rootProject.modrinth_id}"
versionName = "${rootProject.mod_display_name}-${rootProject.minecraft_version}-${project.mod_version}-Fabric"
versionNumber = "${rootProject.minecraft_version}-${project.mod_version}-Fabric"
versionType = "${project.release_type}"
uploadFile = file("${project.buildDir}/libs/${rootProject.archives_base_name}-${project.name}-mc${rootProject.minecraft_version}-${project.mod_version}.jar")
gameVersions = List.of(project.support_versions.split(","))
loaders = ["fabric", "quilt"]
dependencies {
required.project("P7dR8mSH")//Fabric API
optional.project("9s6osm5g")//Cloth Config API
}
}
}
4 changes: 2 additions & 2 deletions forge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
id 'com.matthewprenger.cursegradle' version '1.4.0'
id "com.modrinth.minotaur" version "2.1.2"
id "com.modrinth.minotaur" version "2.4.4"
}

architectury {
Expand Down Expand Up @@ -109,7 +109,7 @@ curseforge {
}
}

if (System.getenv('modrinthapikey') != null && "${modrinth_id}" != '') {
if (System.getenv('modrinthapikey') != null && "${project.modrinth_id}" != '') {
modrinth {
token = System.getenv('modrinthapikey')
projectId = "${rootProject.modrinth_id}"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ enabled_platforms=fabric,forge

archives_base_name=memoryusagescreen
mod_display_name=MemoryUsageScreen
mod_version=1.6
mod_version=1.7.0
maven_group=net.morimori0317

architectury_version=7.0.65
Expand Down

0 comments on commit 370f529

Please sign in to comment.