1
0
Fork 0

remove block break progress sending

This commit is contained in:
Sen 2025-08-29 09:45:25 +02:00
parent 01ceef058c
commit 9b0bc17a95
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
12 changed files with 46 additions and 354 deletions

View file

@ -29,7 +29,6 @@ import common.packet.SPacketPlayerAbilities;
import common.packet.SPacketTabComplete;
import common.packet.SPacketUpdateEntityTags;
import common.packet.SPacketAnimation;
import common.packet.SPacketBlockBreakAnim;
import common.packet.SPacketBlockChange;
import common.packet.SPacketCamera;
import common.packet.SPacketCelestials;
@ -118,7 +117,6 @@ public interface IClientPlayer extends NetHandler {
void handleWindowProperty(SPacketWindowProperty packet);
void handleEntityEquipment(SPacketEntityEquipment packet);
void handleCloseWindow(SPacketCloseWindow packet);
void handleBlockBreakAnim(SPacketBlockBreakAnim packet);
void handleMapChunkBulk(SPacketMapChunkBulk packet);
void handleChangeGameState(SPacketChangeGameState packet);
void handleEffect(SPacketEffect packet);

View file

@ -66,7 +66,6 @@ import common.packet.SPacketPlayerAbilities;
import common.packet.SPacketTabComplete;
import common.packet.SPacketUpdateEntityTags;
import common.packet.SPacketAnimation;
import common.packet.SPacketBlockBreakAnim;
import common.packet.SPacketBlockChange;
import common.packet.SPacketCamera;
import common.packet.SPacketCelestials;
@ -152,7 +151,6 @@ public enum PacketRegistry {
this.server(SPacketChunkData.class);
this.server(SPacketMultiBlockChange.class);
this.server(SPacketBlockChange.class);
this.server(SPacketBlockBreakAnim.class);
this.server(SPacketMapChunkBulk.class);
this.server(SPacketExplosion.class);
this.server(SPacketEffect.class);

View file

@ -1,69 +0,0 @@
package common.packet;
import java.io.IOException;
import common.network.IClientPlayer;
import common.network.Packet;
import common.network.PacketBuffer;
import common.util.BlockPos;
public class SPacketBlockBreakAnim implements Packet<IClientPlayer>
{
private int breakerId;
private BlockPos position;
private int progress;
public SPacketBlockBreakAnim()
{
}
public SPacketBlockBreakAnim(int breakerId, BlockPos pos, int progress)
{
this.breakerId = breakerId;
this.position = pos;
this.progress = progress;
}
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.breakerId = buf.readVarInt();
this.position = buf.readBlockPos();
this.progress = buf.readUnsignedByte();
}
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeVarInt(this.breakerId);
buf.writeBlockPos(this.position);
buf.writeByte(this.progress);
}
/**
* Passes this Packet on to the NetHandler for processing.
*/
public void processPacket(IClientPlayer handler)
{
handler.handleBlockBreakAnim(this);
}
public int getBreakerId()
{
return this.breakerId;
}
public BlockPos getPosition()
{
return this.position;
}
public int getProgress()
{
return this.progress;
}
}