Fabric loader 0.4.0

This commit is contained in:
creeper123123321 2019-04-07 14:59:00 -03:00
parent e8f239e7d2
commit 186627e899
No known key found for this signature in database
GPG Key ID: 0AC57D54786721D1
5 changed files with 22 additions and 28 deletions

View File

@ -51,9 +51,9 @@ dependencies {
minecraft("com.mojang:minecraft:19w14b")
mappings("net.fabricmc:yarn:19w14b.1")
modCompile("net.fabricmc:fabric-loader:0.3.7.109")
modCompile("net.fabricmc:fabric-loader:0.4.0+build.113")
modCompile("net.fabricmc:fabric:0.2.6.119")
modCompile("net.fabricmc:fabric:0.2.6.121")
}
tasks.named<Jar>("jar") {

View File

@ -32,8 +32,8 @@ import com.github.creeper123123321.viafabric.providers.VRVersionProvider;
import com.github.creeper123123321.viafabric.util.FutureTaskId;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.loader.ModContainer;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.ModContainer;
import net.minecraft.client.MinecraftClient;
import net.minecraft.entity.Entity;
import net.minecraft.server.MinecraftServer;
@ -271,13 +271,13 @@ public class VRPlatform implements ViaPlatform {
public JsonObject getDump() {
JsonObject platformSpecific = new JsonObject();
List<PluginInfo> mods = new ArrayList<>();
for (ModContainer mod : net.fabricmc.loader.FabricLoader.INSTANCE.getModContainers()) {
for (ModContainer mod : FabricLoader.getInstance().getAllMods()) {
mods.add(new PluginInfo(true,
mod.getMetadata().getName(),
mod.getMetadata().getVersion().getFriendlyString(),
String.join(", ", mod.getInfo().getInitializers()),
mod.getInfo().getAuthors().stream()
.map(info -> info.getName() + " <" + info.getEmail() + "> (" + info.getWebsite() + ")")
null,
mod.getMetadata().getAuthors().stream()
.map(info -> info.getName() + "(" + info.getContact().asMap() + ")")
.collect(Collectors.toList())
));
}

View File

@ -1,29 +1,33 @@
{
"schemaVersion": 1,
"id": "viafabric",
"name": "ViaFabric",
"side": "universal",
"version": "@version@",
"description": "@description@",
"license": "MIT",
"links": {
"contact": {
"homepage": "https://github.com/ViaVersion/ViaFabric",
"issues": "https://github.com/ViaVersion/ViaFabric/issues",
"sources": "https://github.com/ViaVersion/ViaFabric"
},
"icon": "assets/viaversion/textures/logo.png",
"environment": "*",
"authors": [
"creeper123123321"
],
"initializers": [
"com.github.creeper123123321.viafabric.ViaFabric"
],
"entrypoints": {
"main": [
"com.github.creeper123123321.viafabric.ViaFabric"
]
},
"requires": {
"fabricloader": ">=0.4.0"
},
"recommended": {
"fabric": "*",
"clientcommands": "*"
},
"mixins": {
"common": "mixins.viafabric.common.json",
"client": "mixins.viafabric.client.json"
}
"mixins": [
"mixins.viafabric.json"
]
}

View File

@ -1,12 +0,0 @@
{
"required": true,
"compatibilityLevel": "JAVA_8",
"package": "com.github.creeper123123321.viafabric.mixin",
"mixins": [
"MixinServerNetworkIOChInit",
"MixinClientConnection"
],
"injectors": {
"defaultRequire": 1
}
}

View File

@ -3,6 +3,8 @@
"compatibilityLevel": "JAVA_8",
"package": "com.github.creeper123123321.viafabric.mixin",
"mixins": [
"MixinServerNetworkIOChInit",
"MixinClientConnection"
],
"client": [
"client.MixinClientConnectionChInit",