Skip to content
This repository was archived by the owner on Apr 27, 2025. It is now read-only.

Commit a4984be

Browse files
committed
Release 0.1.0
remove modcore dependency rewrite transforms as mixins
1 parent 75bd297 commit a4984be

24 files changed

+525
-836
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
# ModelFix
2-
3-
Originally created by [Pepper_Bell](https://www.curseforge.com/members/pepper_bell/projects) on [CurseForge](https://www.curseforge.com/minecraft/mc-mods/item-model-fix) for 1.16.x.
4-
This bad been backported to 1.8.9 by community request. Not currently eligible for inclusion in [Patcher](https://sk1er.club/mods/patcher), due to license incompatibilities.
5-
6-
#### The original mod is labeled as alpha software, and therefore this port is also still in alpha.
1+
## ModelFix
2+
Fixes the 'transparent lines' in items.

build.gradle

Lines changed: 0 additions & 93 deletions
This file was deleted.

build.gradle.kts

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
@file:Suppress("UnstableApiUsage", "PropertyName")
2+
3+
import org.polyfrost.gradle.util.noServerRunConfigs
4+
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
5+
6+
plugins {
7+
kotlin("jvm")
8+
id("org.polyfrost.multi-version")
9+
id("org.polyfrost.defaults.repo")
10+
id("org.polyfrost.defaults.java")
11+
id("org.polyfrost.defaults.loom")
12+
id("com.github.johnrengelman.shadow")
13+
id("net.kyori.blossom") version "1.3.2"
14+
id("signing")
15+
java
16+
}
17+
18+
val mod_name: String by project
19+
val mod_version: String by project
20+
val mod_id: String = mod_name.lowercase()
21+
val mod_archives_name: String = mod_name
22+
23+
blossom {
24+
replaceToken("@VER@", mod_version)
25+
replaceToken("@NAME@", mod_name)
26+
replaceToken("@ID@", mod_id)
27+
}
28+
29+
version = mod_version
30+
group = "com.github.chromaticforge.rawinput"
31+
32+
base {
33+
archivesName.set("$mod_archives_name-$platform")
34+
}
35+
36+
loom {
37+
noServerRunConfigs()
38+
39+
if (project.platform.isLegacyForge) {
40+
runConfigs {
41+
"client" {
42+
property("mixin.debug.export", "true")
43+
}
44+
}
45+
}
46+
47+
if (project.platform.isForge) {
48+
forge {
49+
mixinConfig("mixins.${mod_id}.json")
50+
}
51+
}
52+
53+
mixin.defaultRefmapName.set("mixins.${mod_id}.refmap.json")
54+
}
55+
56+
val shade: Configuration by configurations.creating {
57+
configurations.implementation.get().extendsFrom(this)
58+
}
59+
val modShade: Configuration by configurations.creating {
60+
configurations.modImplementation.get().extendsFrom(this)
61+
}
62+
63+
sourceSets {
64+
main {
65+
output.setResourcesDir(java.classesDirectory)
66+
}
67+
}
68+
69+
repositories {
70+
maven("https://repo.polyfrost.org/releases")
71+
}
72+
73+
dependencies {
74+
modRuntimeOnly("me.djtheredstoner:DevAuth-${if (platform.isFabric) "fabric" else if (platform.isLegacyForge) "forge-legacy" else "forge-latest"}:1.2.0")
75+
76+
if (platform.isLegacyForge) {
77+
compileOnly("org.spongepowered:mixin:0.7.11-SNAPSHOT")
78+
}
79+
}
80+
81+
tasks {
82+
processResources {
83+
inputs.property("id", mod_id)
84+
inputs.property("name", mod_name)
85+
val java = if (project.platform.mcMinor >= 18) {
86+
17
87+
} else {
88+
if (project.platform.mcMinor == 17)
89+
16
90+
else
91+
8
92+
}
93+
val compatLevel = "JAVA_${java}"
94+
inputs.property("java", java)
95+
inputs.property("java_level", compatLevel)
96+
inputs.property("version", mod_version)
97+
inputs.property("mcVersionStr", project.platform.mcVersionStr)
98+
filesMatching(listOf("mcmod.info", "mixins.${mod_id}.json", "mods.toml")) {
99+
expand(
100+
mapOf(
101+
"id" to mod_id,
102+
"name" to mod_name,
103+
"java" to java,
104+
"java_level" to compatLevel,
105+
"version" to mod_version,
106+
"mcVersionStr" to project.platform.mcVersionStr
107+
)
108+
)
109+
}
110+
filesMatching("fabric.mod.json") {
111+
expand(
112+
mapOf(
113+
"id" to mod_id,
114+
"name" to mod_name,
115+
"java" to java,
116+
"java_level" to compatLevel,
117+
"version" to mod_version,
118+
"mcVersionStr" to project.platform.mcVersionStr.substringBeforeLast(".") + ".x"
119+
)
120+
)
121+
}
122+
}
123+
124+
withType(Jar::class.java) {
125+
if (project.platform.isFabric) {
126+
exclude("mcmod.info", "mods.toml")
127+
} else {
128+
exclude("fabric.mod.json")
129+
if (project.platform.isLegacyForge) {
130+
exclude("mods.toml")
131+
} else {
132+
exclude("mcmod.info")
133+
}
134+
}
135+
}
136+
137+
named<ShadowJar>("shadowJar") {
138+
archiveClassifier.set("dev")
139+
configurations = listOf(shade, modShade)
140+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
141+
}
142+
143+
remapJar {
144+
inputFile.set(shadowJar.get().archiveFile)
145+
archiveClassifier.set("")
146+
}
147+
148+
jar {
149+
if (platform.isLegacyForge) {
150+
manifest.attributes += mapOf(
151+
"ModSide" to "CLIENT",
152+
"ForceLoadAsMod" to true,
153+
"TweakOrder" to "0",
154+
"MixinConfigs" to "mixins.${mod_id}.json",
155+
)
156+
}
157+
dependsOn(shadowJar)
158+
archiveClassifier.set("")
159+
enabled = false
160+
}
161+
}

gradle.properties

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
modGroup=club.sk1er
2-
modVersion=1.0
3-
modBaseName=ModelFix
4-
forgeVersion=1.8.9-11.15.1.2318-1.8.9
5-
mcpVersion=stable_22
1+
mod_name=ModelFix
2+
mod_version=0.1.0
63

4+
# Gradle Configuration -- DO NOT TOUCH THESE VALUES.
5+
polyfrost.defaults.loom=3
76
org.gradle.daemon=true
87
org.gradle.parallel=true
98
org.gradle.configureoncommand=true

gradle/wrapper/gradle-wrapper.jar

54.9 KB
Binary file not shown.
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)