mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-02-13 09:30:05 +00:00
Fix a couple of packaging issues
- Fix client classes not being included in Forge. - Only remap Nettty's HTTP classes, not all of them. This feels a little more error prone - maybe we should jar-in-jar this in the future. - Use the correct refmaps on Forge. - Prevent the Fabric jar pulling in some other mods. Closes #1247
This commit is contained in:
parent
18fbd96c10
commit
06163e4f25
@ -27,7 +27,7 @@ nightConfig = "3.6.5"
|
||||
slf4j = "1.7.36"
|
||||
|
||||
# Minecraft mods
|
||||
forgeConfig = "4.2.7"
|
||||
forgeConfig = "4.2.9"
|
||||
iris = "1.19.3-v1.4.6"
|
||||
jei = "11.3.0.262"
|
||||
modmenu = "5.0.1"
|
||||
|
@ -35,9 +35,7 @@ addRemappedConfiguration("testWithSodium")
|
||||
addRemappedConfiguration("testWithIris")
|
||||
|
||||
dependencies {
|
||||
modImplementation(libs.bundles.externalMods.fabric) {
|
||||
exclude("curse.maven", "configured-fabric-667378") // Added by Forge Config API
|
||||
}
|
||||
modImplementation(libs.bundles.externalMods.fabric)
|
||||
modCompileOnly(libs.bundles.externalMods.fabric.compile) {
|
||||
exclude("net.fabricmc", "fabric-loader")
|
||||
exclude("net.fabricmc.fabric-api")
|
||||
@ -238,6 +236,7 @@ publishing {
|
||||
mavenDependencies {
|
||||
exclude(dependencies.create("cc.tweaked:"))
|
||||
exclude(libs.jei.fabric.get())
|
||||
exclude(libs.modmenu.get())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ import net.fabricmc.fabric.api.event.player.UseEntityCallback;
|
||||
import net.fabricmc.fabric.api.lookup.v1.block.BlockApiCache;
|
||||
import net.fabricmc.fabric.api.lookup.v1.block.BlockApiLookup;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;
|
||||
import net.fabricmc.fabric.api.registry.FuelRegistry;
|
||||
import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerFactory;
|
||||
import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerType;
|
||||
import net.fabricmc.fabric.api.tag.convention.v1.ConventionalItemTags;
|
||||
@ -60,7 +61,6 @@ import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
@ -242,7 +242,7 @@ public class PlatformHelperImpl implements PlatformHelper {
|
||||
|
||||
@Override
|
||||
public int getBurnTime(ItemStack stack) {
|
||||
return AbstractFurnaceBlockEntity.getFuel().getOrDefault(stack.getItem(), 0);
|
||||
return FuelRegistry.INSTANCE.get(stack.getItem());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -115,8 +115,8 @@ minecraft {
|
||||
}
|
||||
|
||||
mixin {
|
||||
add(sourceSets.main.get(), "computercraft.mixins.refmap.json")
|
||||
add(sourceSets.client.get(), "computercraft-client.mixins.refmap.json")
|
||||
add(sourceSets.main.get(), "computercraft.refmap.json")
|
||||
add(sourceSets.client.get(), "client-computercraft.refmap.json")
|
||||
|
||||
config("computercraft.mixins.json")
|
||||
config("computercraft-client.mixins.json")
|
||||
@ -133,6 +133,7 @@ configurations {
|
||||
|
||||
dependencies {
|
||||
annotationProcessor("org.spongepowered:mixin:0.8.5-SQUID:processor")
|
||||
clientAnnotationProcessor("org.spongepowered:mixin:0.8.5-SQUID:processor")
|
||||
|
||||
compileOnly(libs.jetbrainsAnnotations)
|
||||
annotationProcessorEverywhere(libs.autoService)
|
||||
@ -219,13 +220,15 @@ tasks.shadowJar {
|
||||
finalizedBy("reobfShadowJar")
|
||||
archiveClassifier.set("")
|
||||
|
||||
from(sourceSets.client.get().output)
|
||||
|
||||
dependencies {
|
||||
include(dependency("cc.tweaked:"))
|
||||
include(dependency(libs.cobalt.get()))
|
||||
include(dependency(libs.netty.http.get()))
|
||||
}
|
||||
relocate("org.squiddev.cobalt", "cc.tweaked.internal.cobalt")
|
||||
relocate("io.netty.handler", "cc.tweaked.internal.netty")
|
||||
relocate("io.netty.handler.codec.http", "cc.tweaked.internal.netty.codec.http")
|
||||
minimize()
|
||||
}
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
{
|
||||
"minVersion": "0.8",
|
||||
"required": true,
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"refmap": "computercraft.mixins.refmap.json",
|
||||
"package": "dan200.computercraft.mixin.client",
|
||||
"minVersion": "0.8",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"client": [
|
||||
"BlockRenderDispatcherMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
"refmap": "client-computercraft.refmap.json"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user