Bruno the CameraMan 图标

Bruno the CameraMan

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 0.0.5
本资源为搬运资源,原资源地址: https://modrinth.com/mod/bruno-the-cameraman
资源信息

Minecraft 版本: 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6

平台: forge

标签: library utility

资源介绍

Bruno is a cinematic camera manager that can be used for interactions or cinematic scenes

 

To create a custom camera you need to register a CustomPoint

Here is an example how to register a CameraPoint

// registration
@Mod.EventBusSubscriber(modid = YourMod.MODID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT)
public class register {
    public static CameraPointAccessor POINT;

    @SubscribeEvent
    public static void onCameraManagerSetup(CameraManagerSetupEvent event) {
        POINT = event.manager.registerPoint("point", CameraPoint.of(
                new Vec3(
                        0,              // x
                        100,            // y
                        0               // z
                ),
                0,                      // yaw
                0,                      // pitch
                0.5f,                   // fov
                1000,                   // duration
                Easing::easeInOutQuad,  // Easing function
                false                   // renderPlayer
        ));
    }
}



as soon as the CameraPoint is registered you can transition to the point on client like this

com.smibii.cameraman.listeners.Camera.manager.transitionToPoint(POINT_NAME)

and on server like this

com.smibii.cameraman.network.NetworkHandler.sendToClient(
       new CameraToPointPacket(POINT_NAME),
       player);

 

If you want to get back to the player can eather transition back to the player

// Client
com.smibii.cameraman.listeners.Camera.manager.transitionToPlayer()

// Server
NetworkHandler.sendToClient(
       new CameraToPlayerPacket(),
       player);

or abruptly exit the camera with

// Client
com.smibii.cameraman.listeners.Camera.manager.setInUse(false);

// Server
NetworkHandler.sendToClient(
       new CameraSetInUsePacket(false),
       player);

 

Feel free to use the api in ur mod, modpack or modify it BUT make sure to mention me. 

Thanks.

 

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Create: Quartz to Experience

价格:0 墨喵币
下载量:0

查看详情
Idiotic Font

价格:0 墨喵币
下载量:0

查看详情
No Netherite +

价格:0 墨喵币
下载量:0

查看详情
Bare Armors (Bare Bones X Immersive Armors)

价格:0 墨喵币
下载量:0

查看详情