Skip to content

Commit

Permalink
use mojang names for new packets
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrygames committed May 30, 2024
1 parent 60d3877 commit 8d46239
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
import com.velocitypowered.proxy.protocol.packet.chat.session.SessionPlayerChatPacket;
import com.velocitypowered.proxy.protocol.packet.chat.session.SessionPlayerCommandPacket;
import com.velocitypowered.proxy.protocol.packet.config.ActiveFeaturesPacket;
import com.velocitypowered.proxy.protocol.packet.config.CustomReportDetailsPacket;
import com.velocitypowered.proxy.protocol.packet.config.ClientboundCustomReportDetailsPacket;
import com.velocitypowered.proxy.protocol.packet.config.FinishedUpdatePacket;
import com.velocitypowered.proxy.protocol.packet.config.KnownPacksPacket;
import com.velocitypowered.proxy.protocol.packet.config.RegistrySyncPacket;
import com.velocitypowered.proxy.protocol.packet.config.ServerLinksPacket;
import com.velocitypowered.proxy.protocol.packet.config.ClientboundServerLinksPacket;
import com.velocitypowered.proxy.protocol.packet.config.StartUpdatePacket;
import com.velocitypowered.proxy.protocol.packet.config.TagsUpdatePacket;
import com.velocitypowered.proxy.protocol.packet.title.LegacyTitlePacket;
Expand Down Expand Up @@ -342,11 +342,11 @@ default boolean handle(KnownPacksPacket packet) {
return false;
}

default boolean handle(CustomReportDetailsPacket packet) {
default boolean handle(ClientboundCustomReportDetailsPacket packet) {
return false;
}

default boolean handle(ServerLinksPacket packet) {
default boolean handle(ClientboundServerLinksPacket packet) {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
import com.velocitypowered.proxy.protocol.packet.ResourcePackRequestPacket;
import com.velocitypowered.proxy.protocol.packet.ResourcePackResponsePacket;
import com.velocitypowered.proxy.protocol.packet.TransferPacket;
import com.velocitypowered.proxy.protocol.packet.config.CustomReportDetailsPacket;
import com.velocitypowered.proxy.protocol.packet.config.ClientboundCustomReportDetailsPacket;
import com.velocitypowered.proxy.protocol.packet.config.FinishedUpdatePacket;
import com.velocitypowered.proxy.protocol.packet.config.RegistrySyncPacket;
import com.velocitypowered.proxy.protocol.packet.config.ServerLinksPacket;
import com.velocitypowered.proxy.protocol.packet.config.ClientboundServerLinksPacket;
import com.velocitypowered.proxy.protocol.packet.config.StartUpdatePacket;
import com.velocitypowered.proxy.protocol.packet.config.TagsUpdatePacket;
import com.velocitypowered.proxy.protocol.util.PluginMessageUtil;
Expand Down Expand Up @@ -114,13 +114,13 @@ public boolean handle(TagsUpdatePacket packet) {
}

@Override
public boolean handle(CustomReportDetailsPacket packet) {
public boolean handle(ClientboundCustomReportDetailsPacket packet) {
serverConn.getPlayer().getConnection().write(packet);
return true;
}

@Override
public boolean handle(ServerLinksPacket packet) {
public boolean handle(ClientboundServerLinksPacket packet) {
serverConn.getPlayer().getConnection().write(packet);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@
import com.velocitypowered.proxy.protocol.packet.chat.session.SessionPlayerCommandPacket;
import com.velocitypowered.proxy.protocol.packet.chat.session.UnsignedPlayerCommandPacket;
import com.velocitypowered.proxy.protocol.packet.config.ActiveFeaturesPacket;
import com.velocitypowered.proxy.protocol.packet.config.CustomReportDetailsPacket;
import com.velocitypowered.proxy.protocol.packet.config.ClientboundCustomReportDetailsPacket;
import com.velocitypowered.proxy.protocol.packet.config.FinishedUpdatePacket;
import com.velocitypowered.proxy.protocol.packet.config.KnownPacksPacket;
import com.velocitypowered.proxy.protocol.packet.config.RegistrySyncPacket;
import com.velocitypowered.proxy.protocol.packet.config.ServerLinksPacket;
import com.velocitypowered.proxy.protocol.packet.config.ClientboundServerLinksPacket;
import com.velocitypowered.proxy.protocol.packet.config.StartUpdatePacket;
import com.velocitypowered.proxy.protocol.packet.config.TagsUpdatePacket;
import com.velocitypowered.proxy.protocol.packet.title.LegacyTitlePacket;
Expand Down Expand Up @@ -217,9 +217,9 @@ public enum StateRegistry {
map(0x0D, MINECRAFT_1_20_5, false));
clientbound.register(KnownPacksPacket.class, KnownPacksPacket::new,
map(0x0E, MINECRAFT_1_20_5, false));
clientbound.register(CustomReportDetailsPacket.class, CustomReportDetailsPacket::new,
clientbound.register(ClientboundCustomReportDetailsPacket.class, ClientboundCustomReportDetailsPacket::new,
map(0x0F, MINECRAFT_1_21, false));
clientbound.register(ServerLinksPacket.class, ServerLinksPacket::new,
clientbound.register(ClientboundServerLinksPacket.class, ClientboundServerLinksPacket::new,
map(0x10, MINECRAFT_1_21, false));
}
},
Expand Down Expand Up @@ -645,9 +645,9 @@ public enum StateRegistry {
TransferPacket::new,
map(0x73, MINECRAFT_1_20_5, false)
);
clientbound.register(CustomReportDetailsPacket.class, CustomReportDetailsPacket::new,
clientbound.register(ClientboundCustomReportDetailsPacket.class, ClientboundCustomReportDetailsPacket::new,
map(0x7A, MINECRAFT_1_21, false));
clientbound.register(ServerLinksPacket.class, ServerLinksPacket::new,
clientbound.register(ClientboundServerLinksPacket.class, ClientboundServerLinksPacket::new,
map(0x7B, MINECRAFT_1_21, false));
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
import java.util.HashMap;
import java.util.Map;

public class CustomReportDetailsPacket implements MinecraftPacket {
public class ClientboundCustomReportDetailsPacket implements MinecraftPacket {

private Map<String, String> details;

public CustomReportDetailsPacket() {
public ClientboundCustomReportDetailsPacket() {
}

public CustomReportDetailsPacket(Map<String, String> details) {
public ClientboundCustomReportDetailsPacket(Map<String, String> details) {
this.details = details;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
import java.util.ArrayList;
import java.util.List;

public class ServerLinksPacket implements MinecraftPacket {
public class ClientboundServerLinksPacket implements MinecraftPacket {

private List<ServerLink> serverLinks;

public ServerLinksPacket() {
public ClientboundServerLinksPacket() {
}

public ServerLinksPacket(List<ServerLink> serverLinks) {
public ClientboundServerLinksPacket(List<ServerLink> serverLinks) {
this.serverLinks = serverLinks;
}

Expand Down

0 comments on commit 8d46239

Please sign in to comment.