@@ -9,7 +9,7 @@ import java.util.*
99
1010plugins {
1111 java
12- id(" xyz.wagyourtail.unimined" ) version " 1.3.14+neofix" apply false
12+ id(" xyz.wagyourtail.unimined" ) version " 1.3.14+neofix.1 " apply false
1313 id(" xyz.wagyourtail.jvmdowngrader" ) version " 1.2.2"
1414 id(" com.diffplug.gradle.spotless" ) version " 8.0.0" apply false
1515 id(" com.gradleup.shadow" ) version " 9.2.2" apply false
@@ -170,119 +170,8 @@ subprojects {
170170 version(mcVersion)
171171
172172 mappings {
173- val mcMappings = " mc_mappings" ()!!
174- when (mcMappingsType) {
175- " mcp" -> {
176- if (! isJarMod) {
177- searge()
178- }
179- mcp(if (isJarMod) " legacy" else " stable" , mcMappings) {
180- if (! isJarMod) {
181- clearOutputs()
182- outputs(" mcp" , true ) { listOf (" intermediary" ) }
183- }
184- }
185- }
186-
187- " forgeMCP" -> {
188- forgeBuiltinMCP(" forge_version" ()!! ) {
189- clearContains()
190- clearOutputs()
191- contains({ _, t ->
192- ! t.contains(" MCP" )
193- }) {
194- onlyExistingSrc()
195- outputs(" searge" , false ) { listOf (" official" ) }
196- }
197- contains({ _, t ->
198- t.contains(" MCP" )
199- }) {
200- outputs(" mcp" , true ) { listOf (" intermediary" ) }
201- sourceNamespace(" searge" )
202- }
203- }
204- officialMappingsFromJar {
205- clearContains()
206- clearOutputs()
207- outputs(" official" , false ) { listOf () }
208- }
209- }
210-
211- " retroMCP" -> {
212- retroMCP(mcMappings)
213- }
214-
215- " yarn" -> {
216- yarn(mcMappings)
217- }
218-
219- " mojmap" -> {
220- mojmap {
221- skipIfNotIn(" intermediary" )
222- }
223- }
224-
225- " parchment" -> {
226- mojmap {
227- skipIfNotIn(" intermediary" )
228- }
229- parchment(mcVersion, mcMappings)
230- }
231-
232- else -> throw GradleException (" Unknown or Unsupported Mappings version" )
233- }
234-
235- // Only use Intermediaries on Versions that support it
236- val usingIntermediary = (isLegacy && protocol >= 39 ) || ! isLegacy
237- if (usingIntermediary) {
238- if (isModern) {
239- intermediary()
240- } else {
241- legacyIntermediary()
242- }
243- }
244-
245- // ability to add custom mappings
246- val target = if (! isModern) " mcp" else " mojmap"
247- stub.withMappings(" searge" , target) {
248- c(" ModLoader" , " net/minecraft/src/ModLoader" , " net/minecraft/src/ModLoader" )
249- c(" BaseMod" , " net/minecraft/src/BaseMod" , " net/minecraft/src/BaseMod" )
250- // Fix: Fixed an inconsistent mapping in 1.16 and 1.16.1 between MCP and Mojmap
251- if (! isLegacy && (protocol == 735 || protocol == 736 )) {
252- c(
253- " dng" ,
254- listOf (
255- " net/minecraft/client/gui/widget/Widget" ,
256- " net/minecraft/client/gui/components/AbstractWidget"
257- )
258- ) {
259- m(" e" , " ()I" , " func_238483_d_" , " getHeightRealms" )
260- }
261- }
262- }
263-
264- if (isMCPJar) {
265- if (protocol <= 2 ) { // MC a1.1.2_01 and below
266- devNamespace(" searge" )
267- } else {
268- devFallbackNamespace(" searge" )
269- }
270- } else if (usingIntermediary) {
271- devFallbackNamespace(" official" )
272- }
273-
274- if (shouldDowngrade) {
275- val apiVersion = if (buildVersion.isJava7) JavaVersion .VERSION_1_8 else buildVersion
276- val downgradeClient = tasks.register(" downgradeClient" , DowngradeFiles ::class .java) {
277- inputCollection = sourceSet.output.classesDirs + sourceSet.runtimeClasspath
278- classpath = project.files()
279- outputCollection.files
280- }
281-
282- runs.config(" client" ) {
283- classpath = downgradeClient.get().outputCollection + files(jvmdg.getDowngradedApi(apiVersion))
284- }
285- }
173+ devNamespace(" official" )
174+ devFallbackNamespace(" official" )
286175 }
287176
288177 minecraftRemapper.config {
@@ -305,7 +194,7 @@ subprojects {
305194 " compileOnly" (" com.github.spotbugs:spotbugs-annotations:4.9.6" )
306195
307196 // Attach UniLib dependency
308- " modImplementation " (
197+ " implementation " (
309198 " com.gitlab.cdagaming.unilib:$libPrefix -${
310199 libName.replaceFirstChar {
311200 if (it.isLowerCase()) it.titlecase(
0 commit comments