Skip to content

Commit

Permalink
Enable split environment source sets
Browse files Browse the repository at this point in the history
  • Loading branch information
Gegy committed Jun 23, 2024
1 parent 034d650 commit 792eace
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ repositories {
}
}

loom {
splitEnvironmentSourceSets()
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
Expand Down Expand Up @@ -110,6 +113,7 @@ dependencies {
modCompileOnly("dev.emi:trinkets:3.7.1")

testmodImplementation sourceSets.main.output
testmodImplementation sourceSets.client.output
}

processResources {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package xyz.nucleoid.plasmid.mixin.game.space;
package xyz.nucleoid.plasmid.client.mixin.game.space;

import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import net.minecraft.server.integrated.IntegratedPlayerManager;
Expand Down
12 changes: 12 additions & 0 deletions src/client/resources/plasmid.client.mixins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"required": true,
"minVersion": "0.8",
"package": "xyz.nucleoid.plasmid.client.mixin",
"compatibilityLevel": "JAVA_17",
"client": [
"game.space.IntegratedPlayerManagerMixin"
],
"injectors": {
"defaultRequire": 1
}
}
8 changes: 7 additions & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
"entrypoints": {
"main": ["xyz.nucleoid.plasmid.Plasmid"]
},
"mixins": ["plasmid.mixins.json"],
"mixins": [
"plasmid.mixins.json",
{
"config": "plasmid.client.mixins.json",
"environment": "client"
}
],
"accessWidener": "plasmid.accesswidener",
"custom": {
"modmenu": {
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/plasmid.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"game.rule.ServerPlayerEntityMixin",
"game.rule.ServerPlayNetworkHandlerMixin",
"game.rule.TridentEntityMixin",
"game.space.IntegratedPlayerManagerMixin",
"game.space.PlayerManagerMixin",
"game.space.ScreenHandlerMixin",
"game.space.ServerPlayerEntityMixin"
Expand Down

0 comments on commit 792eace

Please sign in to comment.