All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minecraft.server.PacketPlayInBlockDig Maven / Gradle / Ivy

package net.minecraft.server;

import java.io.IOException;

public class PacketPlayInBlockDig implements Packet {
	
	private BlockPosition a;
	private EnumDirection b;
	private EnumPlayerDigType c;
	
	public PacketPlayInBlockDig() {
	}
	
	public void a(PacketDataSerializer packetdataserializer) throws IOException {
		this.c = packetdataserializer.a(EnumPlayerDigType.class);
		this.a = packetdataserializer.c();
		this.b = EnumDirection.fromType1(packetdataserializer.readUnsignedByte());
	}
	
	public void b(PacketDataSerializer packetdataserializer) throws IOException {
		packetdataserializer.a(this.c);
		packetdataserializer.a(this.a);
		packetdataserializer.writeByte(this.b.a());
	}
	
	public void a(PacketListenerPlayIn packetlistenerplayin) {
		packetlistenerplayin.a(this);
	}
	
	public BlockPosition a() {
		return this.a;
	}
	
	public EnumDirection b() {
		return this.b;
	}
	
	public EnumPlayerDigType c() {
		return this.c;
	}
	
	public enum EnumPlayerDigType {
		START_DESTROY_BLOCK,
		ABORT_DESTROY_BLOCK,
		STOP_DESTROY_BLOCK,
		DROP_ALL_ITEMS,
		DROP_ITEM,
		RELEASE_USE_ITEM;
		
		EnumPlayerDigType() {
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy