DimensionSliceEntity.java 文件源码

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

项目:Factorization 作者:
void shareTransforms() {
    boolean needSync = (transformSynced.getGrandUnifiedDistance(transform) != 0 || velocitySynced.getGrandUnifiedDistance(velocity) != 0) && !hasOrders();
    if (!needSync) return;
    try {
        ByteBuf output = Unpooled.buffer();
        Core.network.prefixEntityPacket(output, this, SyncMessages.TRANSFORMS);
        putTransforms(new DataOutByteBuf(output, Side.SERVER));
        FMLProxyPacket toSend = Core.network.entityPacket(output);
        Core.network.broadcastPacket(null, new Coord(this), toSend);
    } catch (IOException e) {
        e.printStackTrace();
        return;
    }
    transformSynced = transform.copy();
    velocitySynced = velocity.copy();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号