mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-04 23:53:01 +00:00
Actually update NeoForge to 1.20.5
NF now loads mods from neoforge.mods.toml rather than mods.toml, so CC wasn't actually being loaded. Tests all passed, because they didn't get run in the first place!
This commit is contained in:
@@ -2,13 +2,12 @@
|
||||
"required": true,
|
||||
"package": "dan200.computercraft.mixin.client",
|
||||
"minVersion": "0.8",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"compatibilityLevel": "JAVA_21",
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"client": [
|
||||
"BlockRenderDispatcherMixin",
|
||||
"ClientPacketListenerMixin"
|
||||
],
|
||||
"refmap": "client-computercraft.refmap.json"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Generators {
|
||||
|
||||
@Override
|
||||
public <T extends DataProvider> T add(BiFunction<PackOutput, CompletableFuture<HolderLookup.Provider>, T> factory) {
|
||||
return generator.addProvider(p -> factory.apply(p, registries));
|
||||
return generator.addProvider(p -> new PrettyDataProvider<>(factory.apply(p, registries))).provider();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// SPDX-FileCopyrightText: 2024 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.mixin;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
||||
import com.mojang.datafixers.schemas.Schema;
|
||||
import com.mojang.datafixers.types.templates.TypeTemplate;
|
||||
import dan200.computercraft.shared.util.ComponentizationFixers;
|
||||
import net.minecraft.util.datafix.schemas.V3818_3;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
||||
/**
|
||||
* Add our custom data components to the datafixer system.
|
||||
* <p>
|
||||
* This mixin is identical between Fabric and NeoForge aside from using a different method name.
|
||||
*/
|
||||
@Mixin(V3818_3.class)
|
||||
class V3818_3Mixin {
|
||||
@ModifyReturnValue(method = "lambda$registerTypes$0", at = @At("TAIL"))
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private static TypeTemplate addExtraTypes(TypeTemplate type, Schema schema) {
|
||||
return ComponentizationFixers.addExtraTypes(type, schema);
|
||||
}
|
||||
}
|
||||
@@ -33,5 +33,8 @@ CC: Tweaked is a fork of ComputerCraft, adding programmable computers, turtles a
|
||||
[[mixins]]
|
||||
config = "computercraft.mixins.json"
|
||||
|
||||
[[mixins]]
|
||||
config = "computercraft.forge.mixins.json"
|
||||
|
||||
[[mixins]]
|
||||
config = "computercraft-client.forge.mixins.json"
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"required": true,
|
||||
"package": "dan200.computercraft.mixin",
|
||||
"minVersion": "0.8",
|
||||
"compatibilityLevel": "JAVA_21",
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"mixins": [
|
||||
"V3818_3Mixin"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user