geforkt von Mirrors/AxiomPaperPlugin
Backport to 1.20.1
Dieser Commit ist enthalten in:
Ursprung
9ba82ce6a7
Commit
1319a3d7c2
@ -25,7 +25,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT")
|
paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT")
|
||||||
implementation("xyz.jpenilla:reflection-remapper:0.1.0-SNAPSHOT")
|
implementation("xyz.jpenilla:reflection-remapper:0.1.0-SNAPSHOT")
|
||||||
|
|
||||||
// Zstd Compression Library
|
// Zstd Compression Library
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
package com.moulberry.axiom.packet;
|
|
||||||
|
|
||||||
import net.minecraft.network.FriendlyByteBuf;
|
|
||||||
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
|
||||||
|
|
||||||
public record CustomByteArrayPayload(ResourceLocation id, byte[] bytes) implements CustomPacketPayload {
|
|
||||||
@Override
|
|
||||||
public void write(FriendlyByteBuf buf) {
|
|
||||||
buf.writeBytes(bytes);
|
|
||||||
}
|
|
||||||
}
|
|
@ -11,7 +11,7 @@ import net.minecraft.core.BlockPos;
|
|||||||
import net.minecraft.core.registries.Registries;
|
import net.minecraft.core.registries.Registries;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.network.FriendlyByteBuf;
|
import net.minecraft.network.FriendlyByteBuf;
|
||||||
import net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket;
|
import net.minecraft.network.protocol.game.ClientboundCustomPayloadPacket;
|
||||||
import net.minecraft.resources.ResourceKey;
|
import net.minecraft.resources.ResourceKey;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
@ -165,7 +165,7 @@ public class RequestChunkDataPacketListener implements PluginMessageListener {
|
|||||||
buf.writeBoolean(false);
|
buf.writeBoolean(false);
|
||||||
byte[] bytes = new byte[buf.writerIndex()];
|
byte[] bytes = new byte[buf.writerIndex()];
|
||||||
buf.getBytes(0, bytes);
|
buf.getBytes(0, bytes);
|
||||||
player.connection.send(new ClientboundCustomPayloadPacket(new CustomByteArrayPayload(RESPONSE_ID, bytes)));
|
player.connection.send(new ClientboundCustomPayloadPacket(RESPONSE_ID, buf));
|
||||||
|
|
||||||
// Continuation packet
|
// Continuation packet
|
||||||
buf = new FriendlyByteBuf(Unpooled.buffer());
|
buf = new FriendlyByteBuf(Unpooled.buffer());
|
||||||
@ -185,7 +185,7 @@ public class RequestChunkDataPacketListener implements PluginMessageListener {
|
|||||||
buf.writeBoolean(false);
|
buf.writeBoolean(false);
|
||||||
byte[] bytes = new byte[buf.writerIndex()];
|
byte[] bytes = new byte[buf.writerIndex()];
|
||||||
buf.getBytes(0, bytes);
|
buf.getBytes(0, bytes);
|
||||||
player.connection.send(new ClientboundCustomPayloadPacket(new CustomByteArrayPayload(RESPONSE_ID, bytes)));
|
player.connection.send(new ClientboundCustomPayloadPacket(RESPONSE_ID, buf));
|
||||||
|
|
||||||
// Continuation packet
|
// Continuation packet
|
||||||
buf = new FriendlyByteBuf(Unpooled.buffer());
|
buf = new FriendlyByteBuf(Unpooled.buffer());
|
||||||
@ -221,7 +221,7 @@ public class RequestChunkDataPacketListener implements PluginMessageListener {
|
|||||||
buf.writeBoolean(false);
|
buf.writeBoolean(false);
|
||||||
byte[] bytes = new byte[buf.writerIndex()];
|
byte[] bytes = new byte[buf.writerIndex()];
|
||||||
buf.getBytes(0, bytes);
|
buf.getBytes(0, bytes);
|
||||||
player.connection.send(new ClientboundCustomPayloadPacket(new CustomByteArrayPayload(RESPONSE_ID, bytes)));
|
player.connection.send(new ClientboundCustomPayloadPacket(RESPONSE_ID, buf));
|
||||||
|
|
||||||
// Continuation packet
|
// Continuation packet
|
||||||
buf = new FriendlyByteBuf(Unpooled.buffer());
|
buf = new FriendlyByteBuf(Unpooled.buffer());
|
||||||
@ -241,7 +241,7 @@ public class RequestChunkDataPacketListener implements PluginMessageListener {
|
|||||||
buf.writeBoolean(false);
|
buf.writeBoolean(false);
|
||||||
byte[] bytes = new byte[buf.writerIndex()];
|
byte[] bytes = new byte[buf.writerIndex()];
|
||||||
buf.getBytes(0, bytes);
|
buf.getBytes(0, bytes);
|
||||||
player.connection.send(new ClientboundCustomPayloadPacket(new CustomByteArrayPayload(RESPONSE_ID, bytes)));
|
player.connection.send(new ClientboundCustomPayloadPacket(RESPONSE_ID, buf));
|
||||||
|
|
||||||
// Continuation packet
|
// Continuation packet
|
||||||
buf = new FriendlyByteBuf(Unpooled.buffer());
|
buf = new FriendlyByteBuf(Unpooled.buffer());
|
||||||
@ -261,7 +261,7 @@ public class RequestChunkDataPacketListener implements PluginMessageListener {
|
|||||||
buf.writeBoolean(true);
|
buf.writeBoolean(true);
|
||||||
byte[] bytes = new byte[buf.writerIndex()];
|
byte[] bytes = new byte[buf.writerIndex()];
|
||||||
buf.getBytes(0, bytes);
|
buf.getBytes(0, bytes);
|
||||||
player.connection.send(new ClientboundCustomPayloadPacket(new CustomByteArrayPayload(RESPONSE_ID, bytes)));
|
player.connection.send(new ClientboundCustomPayloadPacket(RESPONSE_ID, buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendEmptyResponse(ServerPlayer player, long id) {
|
private void sendEmptyResponse(ServerPlayer player, long id) {
|
||||||
@ -273,7 +273,7 @@ public class RequestChunkDataPacketListener implements PluginMessageListener {
|
|||||||
|
|
||||||
byte[] bytes = new byte[buf.writerIndex()];
|
byte[] bytes = new byte[buf.writerIndex()];
|
||||||
buf.getBytes(0, bytes);
|
buf.getBytes(0, bytes);
|
||||||
player.connection.send(new ClientboundCustomPayloadPacket(new CustomByteArrayPayload(RESPONSE_ID, bytes)));
|
player.connection.send(new ClientboundCustomPayloadPacket(RESPONSE_ID, buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,9 +31,14 @@ import net.minecraft.world.phys.BlockHitResult;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
|
<<<<<<< HEAD
|
||||||
import org.bukkit.craftbukkit.v1_20_R3.CraftWorld;
|
import org.bukkit.craftbukkit.v1_20_R3.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_20_R3.block.CraftBlock;
|
import org.bukkit.craftbukkit.v1_20_R3.block.CraftBlock;
|
||||||
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer;
|
||||||
|
=======
|
||||||
|
import org.bukkit.craftbukkit.v1_20_R1.block.CraftBlock;
|
||||||
|
import org.bukkit.craftbukkit.v1_20_R1.entity.CraftPlayer;
|
||||||
|
>>>>>>> 7c8f500 (Backport to 1.20.1)
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren