more cleanup and resource pack api fixes
This commit is contained in:
@@ -3755,10 +3755,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ // TODO UUID API
|
||||
+ // Paper start - adventure
|
||||
+ @Override
|
||||
+ public void setResourcePack(String url, byte[] hashBytes, net.kyori.adventure.text.Component prompt, boolean force) {
|
||||
+ public void setResourcePack(final UUID uuid, final String url, final byte[] hashBytes, final net.kyori.adventure.text.Component prompt, final boolean force) {
|
||||
+ Preconditions.checkArgument(uuid != null, "Resource pack UUID cannot be null");
|
||||
+ Preconditions.checkArgument(url != null, "Resource pack URL cannot be null");
|
||||
+ final String hash;
|
||||
+ if (hashBytes != null) {
|
||||
@@ -3767,9 +3767,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ } else {
|
||||
+ hash = "";
|
||||
+ }
|
||||
+ this.getHandle().connection.send(new ClientboundResourcePackPushPacket(UUID.randomUUID(), url, hash, force, io.papermc.paper.adventure.PaperAdventure.asVanilla(prompt)));
|
||||
+ this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundResourcePackPopPacket(Optional.empty()));
|
||||
+ this.getHandle().connection.send(new ClientboundResourcePackPushPacket(uuid, url, hash, force, io.papermc.paper.adventure.PaperAdventure.asVanilla(prompt)));
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - adventure
|
||||
+
|
||||
public void addChannel(String channel) {
|
||||
Preconditions.checkState(this.channels.size() < 128, "Cannot register channel '%s'. Too many channels registered!", channel);
|
||||
|
||||
Reference in New Issue
Block a user