Limit block placement/interaction packets
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
@@ -5,3 +5,19 @@
|
||||
package net.minecraft.network.protocol.game;
|
||||
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
@@ -13,6 +14,7 @@
|
||||
private final BlockHitResult blockHit;
|
||||
private final InteractionHand hand;
|
||||
private final int sequence;
|
||||
+ public long timestamp; // Spigot
|
||||
|
||||
public ServerboundUseItemOnPacket(InteractionHand hand, BlockHitResult blockHitResult, int sequence) {
|
||||
this.hand = hand;
|
||||
@@ -21,6 +23,7 @@
|
||||
}
|
||||
|
||||
private ServerboundUseItemOnPacket(FriendlyByteBuf buf) {
|
||||
+ this.timestamp = System.currentTimeMillis(); // Spigot
|
||||
this.hand = (InteractionHand) buf.readEnum(InteractionHand.class);
|
||||
this.blockHit = buf.readBlockHitResult();
|
||||
this.sequence = buf.readVarInt();
|
||||
|
||||
@@ -5,3 +5,19 @@
|
||||
package net.minecraft.network.protocol.game;
|
||||
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
@@ -13,6 +14,7 @@
|
||||
private final int sequence;
|
||||
private final float yRot;
|
||||
private final float xRot;
|
||||
+ public long timestamp; // Spigot
|
||||
|
||||
public ServerboundUseItemPacket(InteractionHand hand, int sequence, float yaw, float pitch) {
|
||||
this.hand = hand;
|
||||
@@ -22,6 +24,7 @@
|
||||
}
|
||||
|
||||
private ServerboundUseItemPacket(FriendlyByteBuf buf) {
|
||||
+ this.timestamp = System.currentTimeMillis(); // Spigot
|
||||
this.hand = (InteractionHand) buf.readEnum(InteractionHand.class);
|
||||
this.sequence = buf.readVarInt();
|
||||
this.yRot = buf.readFloat();
|
||||
|
||||
Reference in New Issue
Block a user