Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added libs/velocity-proxy-3.5.0-SNAPSHOT-all.jar
Binary file not shown.
9 changes: 2 additions & 7 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@ dependencies() {
implementation(libs.elytrium.fastprepare)
compileOnly(libs.minecraft.velocity.api)
annotationProcessor(libs.minecraft.velocity.api)
compileOnly(libs.minecraft.velocity.proxy) // From Elytrium Repo.
compileOnly(libs.minecraft.velocity.native)

// Needs for some velocity methods.
compileOnly(libs.tool.netty.codec)
compileOnly(libs.tool.netty.handler)
compileOnly(libs.tool.fastutil)
compileOnly(files("../libs/velocity-proxy-3.5.0-SNAPSHOT-all.jar"))
compileOnly("it.unimi.dsi:fastutil:8.5.18") // not able to compile without it

implementation(libs.minecraft.bstats.velocity)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
import com.velocitypowered.api.proxy.InboundConnection;
import com.velocitypowered.api.proxy.crypto.IdentifiedKey;
import com.velocitypowered.api.proxy.player.TabList;
import com.velocitypowered.api.proxy.server.PlayerInfoForwarding;
import com.velocitypowered.api.util.GameProfile;
import com.velocitypowered.api.util.UuidUtils;
import com.velocitypowered.natives.compression.VelocityCompressor;
import com.velocitypowered.natives.util.Natives;
import com.velocitypowered.proxy.VelocityServer;
import com.velocitypowered.proxy.config.PlayerInfoForwarding;
import com.velocitypowered.proxy.config.VelocityConfiguration;
import com.velocitypowered.proxy.connection.MinecraftConnection;
import com.velocitypowered.proxy.connection.client.AuthSessionHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import com.velocitypowered.api.proxy.ProxyServer;
import com.velocitypowered.api.proxy.player.TabListEntry;
import com.velocitypowered.proxy.VelocityServer;
import com.velocitypowered.proxy.connection.MinecraftConnection;
import com.velocitypowered.proxy.connection.client.ConnectedPlayer;
import com.velocitypowered.proxy.tablist.KeyedVelocityTabList;
Expand All @@ -36,7 +37,7 @@ public class RewritingKeyedVelocityTabList extends KeyedVelocityTabList implemen
protected final Map<UUID, KeyedVelocityTabListEntry> entries;

public RewritingKeyedVelocityTabList(ConnectedPlayer player, ProxyServer proxyServer) {
super(player, proxyServer);
super(player, (VelocityServer) proxyServer);
this.player = super.player;
this.connection = super.connection;
this.proxyServer = super.proxyServer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import com.velocitypowered.api.proxy.ProxyServer;
import com.velocitypowered.api.proxy.player.TabListEntry;
import com.velocitypowered.proxy.VelocityServer;
import com.velocitypowered.proxy.connection.MinecraftConnection;
import com.velocitypowered.proxy.connection.client.ConnectedPlayer;
import com.velocitypowered.proxy.tablist.KeyedVelocityTabListEntry;
Expand All @@ -36,7 +37,7 @@ public class RewritingVelocityTabListLegacy extends VelocityTabListLegacy implem
protected final Map<UUID, KeyedVelocityTabListEntry> entries;

public RewritingVelocityTabListLegacy(ConnectedPlayer player, ProxyServer proxyServer) {
super(player, proxyServer);
super(player, (VelocityServer) proxyServer);
this.player = super.player;
this.connection = super.connection;
this.proxyServer = super.proxyServer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
package net.elytrium.limboapi.utils;

import com.google.common.collect.Streams;
import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.ints.IntCollection;
import it.unimi.dsi.fastutil.objects.Object2IntMap;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
import it.unimi.dsi.fastutil.objects.ObjectSet;
import java.util.stream.Collectors;
import net.elytrium.limboapi.api.utils.OverlayMap;
Expand Down Expand Up @@ -77,10 +77,10 @@ public ObjectSet<K> keySet() {

@Override
public IntCollection values() {
return Streams
.concat(((Object2IntMap<K>) this.parent).values().intStream(), ((Object2IntMap<K>) this.overlay).values().intStream())
.boxed()
.collect(Collectors.toCollection(IntArrayList::new));
Object2IntOpenHashMap<Object> hashMap = new Object2IntOpenHashMap<>();
Streams.concat(((Object2IntMap<K>) this.parent).values().intStream(), ((Object2IntMap<K>) this.overlay).values().intStream())
.forEach(value -> hashMap.put(new Object(), value));
return hashMap.values();
}

@Override
Expand Down
Loading