1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-12 23:35:58 +00:00

Merge branch 'mc-1.20.x' into mc-1.21.x

This commit is contained in:
Jonathan Coates
2025-01-12 20:48:49 +00:00
55 changed files with 1545 additions and 521 deletions

View File

@@ -31,10 +31,10 @@ fun addRemappedConfiguration(name: String) {
}
val capitalName = name.replaceFirstChar { it.titlecase(Locale.ROOT) }
loom.addRemapConfiguration("mod$capitalName") {
onCompileClasspath.set(false)
onRuntimeClasspath.set(true)
sourceSet.set(ourSourceSet)
targetConfigurationName.set(name)
onCompileClasspath = false
onRuntimeClasspath = true
sourceSet = ourSourceSet
targetConfigurationName = name
}
configurations.create(name) {
isCanBeConsumed = false
@@ -107,7 +107,7 @@ dependencies {
}
loom {
accessWidenerPath.set(project(":common").file("src/main/resources/computercraft.accesswidener"))
accessWidenerPath = project(":common").file("src/main/resources/computercraft.accesswidener")
mixin.useLegacyMixinAp = false
mods {
@@ -278,7 +278,7 @@ tasks.register("checkClient") {
}
modPublishing {
output.set(tasks.remapJar)
output = tasks.remapJar
}
tasks.withType(GenerateModuleMetadata::class).configureEach { isEnabled = false }

View File

@@ -0,0 +1,13 @@
{
"required": true,
"package": "dan200.computercraft.mixin",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_17",
"injectors": {
"defaultRequire": 1
},
"mixins": [
"TagEntryAccessor",
"TagsProviderMixin"
]
}

View File

@@ -9,5 +9,8 @@
},
"depends": {
"computercraft": "*"
}
},
"mixins": [
"computercraft-datagen.fabric.mixins.json"
]
}

View File

@@ -13,8 +13,6 @@
"ItemEntityMixin",
"PlayerChunkSenderMixin",
"ServerLevelMixin",
"TagEntryAccessor",
"TagsProviderMixin",
"V3818_3Mixin"
]
}

View File

@@ -26,7 +26,7 @@ public class TestMod implements ModInitializer, ClientModInitializer {
var phase = ResourceLocation.fromNamespaceAndPath(ComputerCraftAPI.MOD_ID, "test_mod");
ServerLifecycleEvents.SERVER_STARTED.addPhaseOrdering(Event.DEFAULT_PHASE, phase);
ServerLifecycleEvents.SERVER_STARTED.register(phase, TestHooks::onServerStarted);
CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> CCTestCommand.register(dispatcher));
CommandRegistrationCallback.EVENT.register((dispatcher, buildContext, environment) -> CCTestCommand.register(dispatcher, buildContext));
PlayerBlockBreakEvents.BEFORE.register((level, player, pos, state, blockEntity) -> !TestHooks.onBeforeDestroyBlock(level, pos, state));
TestHooks.loadTests(GameTestRegistry::register);