Fabric works!

This commit is contained in:
samolego 2021-02-06 22:35:00 +01:00
parent 6920315952
commit d9535643fc
6 changed files with 23 additions and 13 deletions

View File

@ -1,8 +1,20 @@
plugins { buildscript {
id "architectury-plugin" version "2.0.65" repositories {
id "forgified-fabric-loom" version "0.6.54" apply false maven { url "https://maven.shedaniel.me/" }
} }
dependencies {
classpath 'com.netflix.nebula:gradle-aggregate-javadocs-plugin:2.2.+'
}
}
plugins {
id "architectury-plugin" version "2.0.68"
id "forgified-fabric-loom" version "0.6.64" apply false
}
architectury { architectury {
minecraft = rootProject.minecraft_version minecraft = rootProject.minecraft_version
} }
@ -13,7 +25,13 @@ subprojects {
loom { loom {
silentMojangMappingsLicense() silentMojangMappingsLicense()
} }
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2")
} }
}
apply plugin: 'nebula-aggregate-javadocs'
allprojects { allprojects {
apply plugin: "java" apply plugin: "java"
@ -31,7 +49,7 @@ allprojects {
// We'll use that if it's available, but otherwise we'll use the older option. // We'll use that if it's available, but otherwise we'll use the older option.
def targetVersion = 8 def targetVersion = 8
if (JavaVersion.current().isJava9Compatible()) { if (JavaVersion.current().isJava9Compatible()) {
options.release = 8 options.release = targetVersion
} }
} }

View File

@ -9,8 +9,6 @@ loom {
} }
dependencies { dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2")
// We depend on fabric loader here to use the fabric @Environment annotations // We depend on fabric loader here to use the fabric @Environment annotations
// Do NOT use other classes from fabric loader // Do NOT use other classes from fabric loader
modCompile "net.fabricmc:fabric-loader:${rootProject.loader_version}" modCompile "net.fabricmc:fabric-loader:${rootProject.loader_version}"

View File

@ -4,10 +4,8 @@ import com.mojang.authlib.GameProfile;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.packet.c2s.login.LoginHelloC2SPacket; import net.minecraft.network.packet.c2s.login.LoginHelloC2SPacket;
import net.minecraft.server.network.ServerLoginNetworkHandler; import net.minecraft.server.network.ServerLoginNetworkHandler;
import net.minecraft.text.TranslatableText;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

View File

@ -7,6 +7,6 @@ public class PlatformSpecific {
@ExpectPlatform @ExpectPlatform
public static boolean isPlayerFake(PlayerEntity player) { public static boolean isPlayerFake(PlayerEntity player) {
// Replaced by Architectury // Replaced by Architectury
return false; throw new AssertionError();
} }
} }

View File

@ -21,8 +21,6 @@ architectury {
} }
dependencies { dependencies {
minecraft("com.mojang:minecraft:${rootProject.minecraft_version}")
mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2")
modImplementation("net.fabricmc:fabric-loader:${rootProject.loader_version}") modImplementation("net.fabricmc:fabric-loader:${rootProject.loader_version}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_version}") modImplementation("net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_version}")

View File

@ -18,8 +18,6 @@ loom {
} }
dependencies { dependencies {
minecraft("com.mojang:minecraft:${rootProject.minecraft_version}")
mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2")
forge("net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}") forge("net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}")
modCompile("me.shedaniel:architectury:${rootProject.architectury_version}:forge") modCompile("me.shedaniel:architectury:${rootProject.architectury_version}:forge")