mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2025-03-11 13:28:45 +01:00
update deps, legacy intermediary is broken
This commit is contained in:
parent
43379d2369
commit
7c88d64676
@ -14,7 +14,7 @@ plugins {
|
|||||||
|
|
||||||
def ENV = System.getenv()
|
def ENV = System.getenv()
|
||||||
def vvVer = "4.1.2-SNAPSHOT"
|
def vvVer = "4.1.2-SNAPSHOT"
|
||||||
def yamlVer = "1.29"
|
def yamlVer = "1.30"
|
||||||
|
|
||||||
description = "Client-side and server-side ViaVersion implementation for Fabric"
|
description = "Client-side and server-side ViaVersion implementation for Fabric"
|
||||||
version = "0.4.5+" + ENV.GITHUB_RUN_NUMBER + "-" + getBranch()
|
version = "0.4.5+" + ENV.GITHUB_RUN_NUMBER + "-" + getBranch()
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
minecraft("com.mojang:minecraft:1.8.9")
|
minecraft("com.mojang:minecraft:1.8.9")
|
||||||
mappings("net.fabricmc:yarn:1.8.9+build.202110221052:v2")
|
mappings("net.fabricmc:yarn:1.8.9+build.202112162000:v2") {
|
||||||
|
exclude(group = "net.fabricmc", module = "fabric-loader-1.8.9")
|
||||||
|
}
|
||||||
|
|
||||||
modImplementation("net.legacyfabric.legacy-fabric-api:legacy-fabric-api:1.1.0+1.8.9")
|
modImplementation("net.legacyfabric.legacy-fabric-api:legacy-fabric-api:1.2.0+1.8.9")
|
||||||
modImplementation("io.github.boogiemonster1o1:modmenu:0.1.0+1.8.9")
|
modImplementation("io.github.boogiemonster1o1:modmenu:0.1.0+1.8.9")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
|
|
||||||
private void registerCommandsV0() {
|
private void registerCommandsV0() {
|
||||||
try {
|
try {
|
||||||
CommandRegistry.INSTANCE.register(new NMSCommandImpl(Via.getManager().getCommandHandler()));
|
// todo fix this
|
||||||
|
//CommandRegistry.INSTANCE.register(new NMSCommandImpl(Via.getManager().getCommandHandler()));
|
||||||
} catch (NoClassDefFoundError ignored2) {
|
} catch (NoClassDefFoundError ignored2) {
|
||||||
JLOGGER.info("Couldn't register command as Fabric Commands isn't installed");
|
JLOGGER.info("Couldn't register command as Fabric Commands isn't installed");
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,8 @@ public class ModMenuConfig implements ModMenuApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Function<Screen, ? extends Screen> getConfigScreenFactory() {
|
// todo fix this
|
||||||
return ViaConfigScreen::new;
|
public Function/*<Screen, ? extends Screen>*/ getConfigScreenFactory() {
|
||||||
|
return it -> new ViaConfigScreen(((Screen) it));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ public class FabricPlatform extends AbstractFabricPlatform {
|
|||||||
|
|
||||||
private FutureTaskId runServerSync(Runnable runnable) {
|
private FutureTaskId runServerSync(Runnable runnable) {
|
||||||
// Kick task needs to be on main thread, it does already have error logger
|
// Kick task needs to be on main thread, it does already have error logger
|
||||||
return new FutureTaskId(CompletableFuture.runAsync(runnable, it -> getServer().method_6444((Callable<Void>) () -> {
|
return new FutureTaskId(CompletableFuture.runAsync(runnable, it -> getServer().method_10815((Callable<Void>) () -> {
|
||||||
it.run();
|
it.run();
|
||||||
return null;
|
return null;
|
||||||
})));
|
})));
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package com.viaversion.fabric.mc18.providers;
|
package com.viaversion.fabric.mc18.providers;
|
||||||
|
|
||||||
import com.viaversion.fabric.mc18.ViaFabric;
|
import com.viaversion.fabric.mc18.ViaFabric;
|
||||||
|
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||||
|
import com.viaversion.viaversion.api.minecraft.item.DataItem;
|
||||||
|
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||||
|
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.HandItemProvider;
|
||||||
import net.fabricmc.api.EnvType;
|
import net.fabricmc.api.EnvType;
|
||||||
import net.fabricmc.api.Environment;
|
import net.fabricmc.api.Environment;
|
||||||
import net.legacyfabric.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
|
import net.legacyfabric.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
|
||||||
@ -8,19 +12,15 @@ import net.legacyfabric.fabric.api.event.lifecycle.v1.ServerTickEvents;
|
|||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.network.ClientPlayerEntity;
|
import net.minecraft.client.network.ClientPlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
|
||||||
import com.viaversion.viaversion.api.minecraft.item.DataItem;
|
|
||||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
|
||||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.HandItemProvider;
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
public class VRHandItemProvider extends HandItemProvider {
|
public class VRHandItemProvider extends HandItemProvider {
|
||||||
public Item clientItem = null;
|
|
||||||
public final Map<UUID, Item> serverPlayers = new ConcurrentHashMap<>();
|
public final Map<UUID, Item> serverPlayers = new ConcurrentHashMap<>();
|
||||||
|
public Item clientItem = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getHandItem(UserConnection info) {
|
public Item getHandItem(UserConnection info) {
|
||||||
@ -51,7 +51,7 @@ public class VRHandItemProvider extends HandItemProvider {
|
|||||||
|
|
||||||
public void registerServerTick() {
|
public void registerServerTick() {
|
||||||
try {
|
try {
|
||||||
ServerTickEvents.END_WORLD_TICK.register(this::tickServer);
|
ServerTickEvents.END_SERVER_TICK.register(this::tickServer);
|
||||||
} catch (NoClassDefFoundError ignored1) {
|
} catch (NoClassDefFoundError ignored1) {
|
||||||
ViaFabric.JLOGGER.info("Fabric Lifecycle V1 isn't installed");
|
ViaFabric.JLOGGER.info("Fabric Lifecycle V1 isn't installed");
|
||||||
}
|
}
|
||||||
@ -64,9 +64,9 @@ public class VRHandItemProvider extends HandItemProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tickServer(World world) {
|
private void tickServer(MinecraftServer server) {
|
||||||
serverPlayers.clear();
|
serverPlayers.clear();
|
||||||
world.playerEntities.forEach(it -> serverPlayers
|
server.getPlayerManager().getPlayers().forEach(it -> serverPlayers
|
||||||
.put(it.getUuid(), fromNative(it.inventory.getMainHandStack())));
|
.put(it.getUuid(), fromNative(it.inventory.getMainHandStack())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ public class ProtocolAutoDetector {
|
|||||||
final ClientConnection clientConnection = new ClientConnection(NetworkSide.CLIENTBOUND);
|
final ClientConnection clientConnection = new ClientConnection(NetworkSide.CLIENTBOUND);
|
||||||
|
|
||||||
ChannelFuture ch = new Bootstrap()
|
ChannelFuture ch = new Bootstrap()
|
||||||
.group(ClientConnection.field_5955.get())
|
.group(ClientConnection.field_11553.get())
|
||||||
.channel(NioSocketChannel.class)
|
.channel(NioSocketChannel.class)
|
||||||
.handler(new ChannelInitializer<Channel>() {
|
.handler(new ChannelInitializer<Channel>() {
|
||||||
protected void initChannel(Channel channel) {
|
protected void initChannel(Channel channel) {
|
||||||
|
Loading…
Reference in New Issue
Block a user