9
0
mirror of https://github.com/HibiscusMC/HibiscusCommons.git synced 2025-12-19 15:09:26 +00:00

Revert "fix: make mount packet sending sync to prevent problems with the backpack staying on the player"

This reverts commit 3c107b51ca.
This commit is contained in:
Logan
2025-10-11 22:04:30 -05:00
parent 3c107b51ca
commit 867ce2e939
14 changed files with 6 additions and 97 deletions

View File

@@ -2,7 +2,6 @@ package me.lojosho.hibiscuscommons.nms;
import it.unimi.dsi.fastutil.Pair;
import it.unimi.dsi.fastutil.ints.IntList;
import me.lojosho.hibiscuscommons.packets.BundledRidingData;
import net.kyori.adventure.text.Component;
import org.bukkit.GameMode;
import org.bukkit.Location;
@@ -105,9 +104,5 @@ public interface NMSPackets {
void sendInvisibleEntity(int entityId, EntityType type, Location location, UUID uuid, List<Player> sendTo);
default void sendBundledRidingPacket(BundledRidingData packet, List<Player> sendTo) {
}
Object createMountPacket(int entityId, int[] passengerIds);
}

View File

@@ -1,37 +0,0 @@
package me.lojosho.hibiscuscommons.packets;
import me.lojosho.hibiscuscommons.nms.NMSHandlers;
import org.bukkit.entity.Player;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class BundledRidingData {
private final LinkedHashMap<Integer, List<Integer>> QUEUED_PACKETS = new LinkedHashMap<>();
public BundledRidingData() {
}
public void add(int owner, int passenger) {
add(owner, List.of(passenger));
}
public void add(int owner, List<Integer> passengers) {
QUEUED_PACKETS.put(owner, passengers);
}
public Map<Integer, List<Integer>> getQueued() {
return QUEUED_PACKETS;
}
/**
* To be sent all at once to the players specified.
*/
public void send(List<Player> sendTo) {
NMSHandlers.getHandler().getPacketHandler().sendBundledRidingPacket(this, sendTo);
}
}