From b33b58af61e276304c6c56ab5abe19b7fa79ebd8 Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Sun, 27 Dec 2020 13:07:04 -0300 Subject: [PATCH] 1.17 --- build.gradle.kts | 8 ++++---- .../com/github/creeper123123321/viafabric/ViaFabric.java | 2 +- .../viafabric/commands/NMSCommandSender.java | 2 +- .../viafabric/commands/VRCommandHandler.java | 2 +- .../viafabric/providers/VRHandItemProvider.java | 4 ++-- src/main/resources/fabric.mod.json | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 6bb0052..68d9622 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -66,11 +66,11 @@ dependencies { // Use 1.16 snapshot, probably intermediary will make it work on further versions // https://modmuss50.me/fabric.html?&version=1.16 - minecraft("com.mojang:minecraft:1.16.3") - mappings("net.fabricmc:yarn:1.16.3+build.5:v2") - modImplementation("net.fabricmc:fabric-loader:0.9.3+build.207") + minecraft("com.mojang:minecraft:20w51a") + mappings("net.fabricmc:yarn:20w51a+build.16:v2") + modImplementation("net.fabricmc:fabric-loader:0.10.8") - modImplementation("net.fabricmc.fabric-api:fabric-api:0.20.2+build.402-1.16") + modImplementation("net.fabricmc.fabric-api:fabric-api:0.28.4+1.17") modImplementation("io.github.prospector:modmenu:1.14.5+build.30") modImplementation("io.github.cottonmc:cotton-client-commands:1.0.1+1.16-rc1") diff --git a/src/main/java/com/github/creeper123123321/viafabric/ViaFabric.java b/src/main/java/com/github/creeper123123321/viafabric/ViaFabric.java index cc9a46d..cdb44cf 100644 --- a/src/main/java/com/github/creeper123123321/viafabric/ViaFabric.java +++ b/src/main/java/com/github/creeper123123321/viafabric/ViaFabric.java @@ -43,7 +43,7 @@ import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback; import net.fabricmc.fabric.api.registry.CommandRegistry; import net.fabricmc.loader.api.FabricLoader; -import net.minecraft.server.command.CommandSource; +import net.minecraft.command.CommandSource; import org.apache.logging.log4j.LogManager; import us.myles.ViaVersion.ViaManager; import us.myles.ViaVersion.api.Via; diff --git a/src/main/java/com/github/creeper123123321/viafabric/commands/NMSCommandSender.java b/src/main/java/com/github/creeper123123321/viafabric/commands/NMSCommandSender.java index f1c8577..fe76fab 100644 --- a/src/main/java/com/github/creeper123123321/viafabric/commands/NMSCommandSender.java +++ b/src/main/java/com/github/creeper123123321/viafabric/commands/NMSCommandSender.java @@ -27,8 +27,8 @@ package com.github.creeper123123321.viafabric.commands; import io.github.cottonmc.clientcommands.CottonClientCommandSource; import net.minecraft.client.MinecraftClient; +import net.minecraft.command.CommandSource; import net.minecraft.entity.Entity; -import net.minecraft.server.command.CommandSource; import net.minecraft.server.command.ServerCommandSource; import net.minecraft.text.Text; import us.myles.ViaVersion.api.command.ViaCommandSender; diff --git a/src/main/java/com/github/creeper123123321/viafabric/commands/VRCommandHandler.java b/src/main/java/com/github/creeper123123321/viafabric/commands/VRCommandHandler.java index 30e99cf..814b306 100644 --- a/src/main/java/com/github/creeper123123321/viafabric/commands/VRCommandHandler.java +++ b/src/main/java/com/github/creeper123123321/viafabric/commands/VRCommandHandler.java @@ -30,7 +30,7 @@ import com.mojang.brigadier.arguments.StringArgumentType; import com.mojang.brigadier.context.CommandContext; import com.mojang.brigadier.suggestion.Suggestions; import com.mojang.brigadier.suggestion.SuggestionsBuilder; -import net.minecraft.server.command.CommandSource; +import net.minecraft.command.CommandSource; import us.myles.ViaVersion.commands.ViaCommandHandler; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/com/github/creeper123123321/viafabric/providers/VRHandItemProvider.java b/src/main/java/com/github/creeper123123321/viafabric/providers/VRHandItemProvider.java index 7d42866..edae3f4 100644 --- a/src/main/java/com/github/creeper123123321/viafabric/providers/VRHandItemProvider.java +++ b/src/main/java/com/github/creeper123123321/viafabric/providers/VRHandItemProvider.java @@ -99,14 +99,14 @@ public class VRHandItemProvider extends HandItemProvider { private void tickClient() { ClientPlayerEntity p = MinecraftClient.getInstance().player; if (p != null) { - clientItem = fromNative(p.inventory.getMainHandStack()); + clientItem = fromNative(p.getInventory().getMainHandStack()); } } private void tickServer(World world) { serverPlayers.clear(); world.getPlayers().forEach(it -> serverPlayers - .put(it.getUuid(), fromNative(it.inventory.getMainHandStack()))); + .put(it.getUuid(), fromNative(it.getInventory().getMainHandStack()))); } private Item fromNative(ItemStack original) { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 132c71c..da7e136 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -72,7 +72,7 @@ "cotton-client-commands": "*", "fabricloader": ">=0.4.0", "fabric-resource-loader-v0": "*", - "minecraft": "1.16.x", + "minecraft": ">1.16.4", "viaversion": ">3.0.1" }, "conflicts": {