mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-06-26 07:03:22 +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"
|
slf4j = "1.7.36"
|
||||||
|
|
||||||
# Minecraft mods
|
# Minecraft mods
|
||||||
forgeConfig = "4.2.7"
|
forgeConfig = "4.2.9"
|
||||||
iris = "1.19.3-v1.4.6"
|
iris = "1.19.3-v1.4.6"
|
||||||
jei = "11.3.0.262"
|
jei = "11.3.0.262"
|
||||||
modmenu = "5.0.1"
|
modmenu = "5.0.1"
|
||||||
|
|
|
@ -35,9 +35,7 @@ addRemappedConfiguration("testWithSodium")
|
||||||
addRemappedConfiguration("testWithIris")
|
addRemappedConfiguration("testWithIris")
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
modImplementation(libs.bundles.externalMods.fabric) {
|
modImplementation(libs.bundles.externalMods.fabric)
|
||||||
exclude("curse.maven", "configured-fabric-667378") // Added by Forge Config API
|
|
||||||
}
|
|
||||||
modCompileOnly(libs.bundles.externalMods.fabric.compile) {
|
modCompileOnly(libs.bundles.externalMods.fabric.compile) {
|
||||||
exclude("net.fabricmc", "fabric-loader")
|
exclude("net.fabricmc", "fabric-loader")
|
||||||
exclude("net.fabricmc.fabric-api")
|
exclude("net.fabricmc.fabric-api")
|
||||||
|
@ -238,6 +236,7 @@ publishing {
|
||||||
mavenDependencies {
|
mavenDependencies {
|
||||||
exclude(dependencies.create("cc.tweaked:"))
|
exclude(dependencies.create("cc.tweaked:"))
|
||||||
exclude(libs.jei.fabric.get())
|
exclude(libs.jei.fabric.get())
|
||||||
|
exclude(libs.modmenu.get())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
import net.fabricmc.fabric.api.lookup.v1.block.BlockApiCache;
|
import net.fabricmc.fabric.api.lookup.v1.block.BlockApiCache;
|
||||||
import net.fabricmc.fabric.api.lookup.v1.block.BlockApiLookup;
|
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.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.ExtendedScreenHandlerFactory;
|
||||||
import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerType;
|
import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerType;
|
||||||
import net.fabricmc.fabric.api.tag.convention.v1.ConventionalItemTags;
|
import net.fabricmc.fabric.api.tag.convention.v1.ConventionalItemTags;
|
||||||
|
@ -60,7 +61,6 @@
|
||||||
import net.minecraft.world.item.crafting.Recipe;
|
import net.minecraft.world.item.crafting.Recipe;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.block.Block;
|
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.BlockEntity;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
@ -242,7 +242,7 @@ public List<TagKey<Item>> getDyeTags() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getBurnTime(ItemStack stack) {
|
public int getBurnTime(ItemStack stack) {
|
||||||
return AbstractFurnaceBlockEntity.getFuel().getOrDefault(stack.getItem(), 0);
|
return FuelRegistry.INSTANCE.get(stack.getItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
|
@ -115,8 +115,8 @@ minecraft {
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin {
|
mixin {
|
||||||
add(sourceSets.main.get(), "computercraft.mixins.refmap.json")
|
add(sourceSets.main.get(), "computercraft.refmap.json")
|
||||||
add(sourceSets.client.get(), "computercraft-client.mixins.refmap.json")
|
add(sourceSets.client.get(), "client-computercraft.refmap.json")
|
||||||
|
|
||||||
config("computercraft.mixins.json")
|
config("computercraft.mixins.json")
|
||||||
config("computercraft-client.mixins.json")
|
config("computercraft-client.mixins.json")
|
||||||
|
@ -133,6 +133,7 @@ configurations {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
annotationProcessor("org.spongepowered:mixin:0.8.5-SQUID:processor")
|
annotationProcessor("org.spongepowered:mixin:0.8.5-SQUID:processor")
|
||||||
|
clientAnnotationProcessor("org.spongepowered:mixin:0.8.5-SQUID:processor")
|
||||||
|
|
||||||
compileOnly(libs.jetbrainsAnnotations)
|
compileOnly(libs.jetbrainsAnnotations)
|
||||||
annotationProcessorEverywhere(libs.autoService)
|
annotationProcessorEverywhere(libs.autoService)
|
||||||
|
@ -219,13 +220,15 @@ tasks.shadowJar {
|
||||||
finalizedBy("reobfShadowJar")
|
finalizedBy("reobfShadowJar")
|
||||||
archiveClassifier.set("")
|
archiveClassifier.set("")
|
||||||
|
|
||||||
|
from(sourceSets.client.get().output)
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
include(dependency("cc.tweaked:"))
|
include(dependency("cc.tweaked:"))
|
||||||
include(dependency(libs.cobalt.get()))
|
include(dependency(libs.cobalt.get()))
|
||||||
include(dependency(libs.netty.http.get()))
|
include(dependency(libs.netty.http.get()))
|
||||||
}
|
}
|
||||||
relocate("org.squiddev.cobalt", "cc.tweaked.internal.cobalt")
|
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()
|
minimize()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"minVersion": "0.8",
|
|
||||||
"required": true,
|
"required": true,
|
||||||
"compatibilityLevel": "JAVA_17",
|
|
||||||
"refmap": "computercraft.mixins.refmap.json",
|
|
||||||
"package": "dan200.computercraft.mixin.client",
|
"package": "dan200.computercraft.mixin.client",
|
||||||
|
"minVersion": "0.8",
|
||||||
|
"compatibilityLevel": "JAVA_17",
|
||||||
|
"injectors": {
|
||||||
|
"defaultRequire": 1
|
||||||
|
},
|
||||||
"client": [
|
"client": [
|
||||||
"BlockRenderDispatcherMixin"
|
"BlockRenderDispatcherMixin"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"refmap": "client-computercraft.refmap.json"
|
||||||
"defaultRequire": 1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user