mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-12-21 16:17:37 +01:00
1.17
This commit is contained in:
parent
75f8661ac9
commit
b33b58af61
@ -66,11 +66,11 @@ dependencies {
|
|||||||
|
|
||||||
// Use 1.16 snapshot, probably intermediary will make it work on further versions
|
// Use 1.16 snapshot, probably intermediary will make it work on further versions
|
||||||
// https://modmuss50.me/fabric.html?&version=1.16
|
// https://modmuss50.me/fabric.html?&version=1.16
|
||||||
minecraft("com.mojang:minecraft:1.16.3")
|
minecraft("com.mojang:minecraft:20w51a")
|
||||||
mappings("net.fabricmc:yarn:1.16.3+build.5:v2")
|
mappings("net.fabricmc:yarn:20w51a+build.16:v2")
|
||||||
modImplementation("net.fabricmc:fabric-loader:0.9.3+build.207")
|
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.prospector:modmenu:1.14.5+build.30")
|
||||||
|
|
||||||
modImplementation("io.github.cottonmc:cotton-client-commands:1.0.1+1.16-rc1")
|
modImplementation("io.github.cottonmc:cotton-client-commands:1.0.1+1.16-rc1")
|
||||||
|
@ -43,7 +43,7 @@ import net.fabricmc.api.ModInitializer;
|
|||||||
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
|
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
|
||||||
import net.fabricmc.fabric.api.registry.CommandRegistry;
|
import net.fabricmc.fabric.api.registry.CommandRegistry;
|
||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
import net.minecraft.server.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import us.myles.ViaVersion.ViaManager;
|
import us.myles.ViaVersion.ViaManager;
|
||||||
import us.myles.ViaVersion.api.Via;
|
import us.myles.ViaVersion.api.Via;
|
||||||
|
@ -27,8 +27,8 @@ package com.github.creeper123123321.viafabric.commands;
|
|||||||
|
|
||||||
import io.github.cottonmc.clientcommands.CottonClientCommandSource;
|
import io.github.cottonmc.clientcommands.CottonClientCommandSource;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.server.command.CommandSource;
|
|
||||||
import net.minecraft.server.command.ServerCommandSource;
|
import net.minecraft.server.command.ServerCommandSource;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import us.myles.ViaVersion.api.command.ViaCommandSender;
|
import us.myles.ViaVersion.api.command.ViaCommandSender;
|
||||||
|
@ -30,7 +30,7 @@ import com.mojang.brigadier.arguments.StringArgumentType;
|
|||||||
import com.mojang.brigadier.context.CommandContext;
|
import com.mojang.brigadier.context.CommandContext;
|
||||||
import com.mojang.brigadier.suggestion.Suggestions;
|
import com.mojang.brigadier.suggestion.Suggestions;
|
||||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||||
import net.minecraft.server.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import us.myles.ViaVersion.commands.ViaCommandHandler;
|
import us.myles.ViaVersion.commands.ViaCommandHandler;
|
||||||
|
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
@ -99,14 +99,14 @@ public class VRHandItemProvider extends HandItemProvider {
|
|||||||
private void tickClient() {
|
private void tickClient() {
|
||||||
ClientPlayerEntity p = MinecraftClient.getInstance().player;
|
ClientPlayerEntity p = MinecraftClient.getInstance().player;
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
clientItem = fromNative(p.inventory.getMainHandStack());
|
clientItem = fromNative(p.getInventory().getMainHandStack());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tickServer(World world) {
|
private void tickServer(World world) {
|
||||||
serverPlayers.clear();
|
serverPlayers.clear();
|
||||||
world.getPlayers().forEach(it -> serverPlayers
|
world.getPlayers().forEach(it -> serverPlayers
|
||||||
.put(it.getUuid(), fromNative(it.inventory.getMainHandStack())));
|
.put(it.getUuid(), fromNative(it.getInventory().getMainHandStack())));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Item fromNative(ItemStack original) {
|
private Item fromNative(ItemStack original) {
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
"cotton-client-commands": "*",
|
"cotton-client-commands": "*",
|
||||||
"fabricloader": ">=0.4.0",
|
"fabricloader": ">=0.4.0",
|
||||||
"fabric-resource-loader-v0": "*",
|
"fabric-resource-loader-v0": "*",
|
||||||
"minecraft": "1.16.x",
|
"minecraft": ">1.16.4",
|
||||||
"viaversion": ">3.0.1"
|
"viaversion": ">3.0.1"
|
||||||
},
|
},
|
||||||
"conflicts": {
|
"conflicts": {
|
||||||
|
Loading…
Reference in New Issue
Block a user