1
0
mirror of https://github.com/chylex/Hardcore-Ender-Expansion-2.git synced 2025-04-08 03:15:50 +02:00

Fix mixin configuration & jar generation

This commit is contained in:
chylex 2021-04-30 17:30:45 +02:00
parent 5b3bf3bd8c
commit d62d8fe5e2
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548
3 changed files with 22 additions and 7 deletions
build.gradle
src/main
java/chylex/hee/mixin
resources

View File

@ -1,6 +1,7 @@
ext {
mc_version = "1.15.2"
forge_version = "31.2.50"
mixin_version = "0.8.2"
mapping_version = "20200626-1.15.1"
kotlin_mod_version = "1.11.0"
}
@ -93,7 +94,7 @@ allprojects {
repositories {
maven {
name = "kotlinforforge"
url = "https://thedarkcolour.github.io/KotlinForForge/"
url = "https://thedarkcolour.github.io/KotlinForForge"
}
}
@ -125,7 +126,8 @@ minecraft {
runs {
client {
property "hee.debug", ""
property "mixin.env.disableRefMap", "true"
property "mixin.env.remapRefMap", "true"
property "mixin.env.refMapRemappingFile", "${projectDir}/build/createSrgToMcp/output.srg"
arg "-mixin.config=hee.mixins.json"
workingDirectory file("run")
@ -140,7 +142,8 @@ minecraft {
server {
property "hee.debug", ""
property "mixin.env.disableRefMap", "true"
property "mixin.env.remapRefMap", "true"
property "mixin.env.refMapRemappingFile", "${projectDir}/build/createSrgToMcp/output.srg"
arg "-mixin.config=hee.mixins.json"
workingDirectory file("run")
@ -173,13 +176,23 @@ minecraft {
}
}
mixin {
add sourceSets.main, "hee.refmap.json"
}
dependencies {
minecraft "net.minecraftforge:forge:" + mc_version + "-" + forge_version
implementation "thedarkcolour:kotlinforforge:" + kotlin_mod_version
implementation project(":system")
testImplementation "org.junit.jupiter:junit-jupiter-api:5.3.0-RC1"
implementation project(":system")
implementation "thedarkcolour:kotlinforforge:" + kotlin_mod_version
testImplementation project(":system")
testImplementation "org.junit.jupiter:junit-jupiter-api:5.3.0-RC1"
if (System.getProperty("idea.sync.active") != "true") {
annotationProcessor "org.spongepowered:mixin:" + mixin_version + ":processor"
testAnnotationProcessor "org.spongepowered:mixin:" + mixin_version + ":processor"
}
}
test {
@ -191,6 +204,7 @@ jar {
from(project(":system").sourceSets.main.output) {
exclude "META-INF"
exclude "pack.mcmeta"
}
from("./data/gen") {

View File

@ -13,7 +13,7 @@ import java.util.Random;
@Mixin(FireBlock.class)
public abstract class HookFireSpread{
@Inject(method = "tryCatchFire", at = @At("HEAD"), cancellable = true)
@Inject(method = "tryCatchFire", at = @At("HEAD"), cancellable = true, remap = false)
private void beforeCatchFire(final World world, final BlockPos pos, final int chance, final Random rand, final int age, final Direction face, final CallbackInfo ci){
final Block block = world.getBlockState(pos).getBlock();

View File

@ -2,6 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "chylex.hee.mixin",
"refmap": "hee.refmap.json",
"compatibilityLevel": "JAVA_8",
"mixins": [
"HookAnvilRepair",