MSGExplosion.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:MHuanterMod 作者:
@Override
public void encodeInto(ChannelHandlerContext ctx, ByteBuf buf) {
    buf.writeDouble(x);
    buf.writeDouble(y);
    buf.writeDouble(z);
    buf.writeFloat(size);
    buf.writeBoolean(smallParticles);
    buf.writeBoolean(bigParticles);

    int n = blocks.size();
    buf.writeInt(n);
    for (int i = 0; i < n; i++) {
        ChunkPosition pos = blocks.get(i);
        int dx = pos.chunkPosX - (int) x;
        int dy = pos.chunkPosY - (int) y;
        int dz = pos.chunkPosZ - (int) z;
        buf.writeByte(dx);
        buf.writeByte(dy);
        buf.writeByte(dz);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号