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

cn.nukkit.network.protocol.AnvilDamagePacket Maven / Gradle / Ivy

Go to download

A Minecraft Bedrock Edition server software implementation made in Java from scratch which supports all new features.

There is a newer version: 1.6.0.1-PN
Show newest version
package cn.nukkit.network.protocol;

import cn.nukkit.api.PowerNukkitOnly;
import cn.nukkit.api.Since;
import cn.nukkit.math.BlockVector3;
import lombok.ToString;

@Since("1.4.0.0-PN")
@ToString
public class AnvilDamagePacket extends DataPacket {
    @Since("1.4.0.0-PN") @PowerNukkitOnly public static final byte NETWORK_ID = ProtocolInfo.ANVIL_DAMAGE_PACKET;

    @Since("1.4.0.0-PN") public int damage;
    @Since("1.4.0.0-PN") public int x;
    @Since("1.4.0.0-PN") public int y;
    @Since("1.4.0.0-PN") public int z;

    @Override
    public byte pid() {
        return ProtocolInfo.ANVIL_DAMAGE_PACKET;
    }

    @Override
    public void decode() {
        this.damage = this.getByte();
        BlockVector3 vec = this.getBlockVector3();
        this.x = vec.x;
        this.y = vec.y;
        this.z = vec.z;
    }

    @Override
    public void encode() {

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy