remove block break progress sending
This commit is contained in:
parent
01ceef058c
commit
9b0bc17a95
12 changed files with 46 additions and 354 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue