실험적 기능

made by dorondo

실험중인 기능들입니다. 정상적인 작동을 보장하지 않습니다

BetterModel Compatibility

베러모델의 모델을 허드로 사용합니다.

import:
    org.joml.Vector3f
    java.util.function.Supplier
    kr.toxicity.model.api.BetterModel
    kr.toxicity.model.api.util.function.FloatSupplier
    
function addBmHud(p:entity,id:string,location:vector,scale:number,model:string,animate:string):: object:
    create section with {_pre} stored in {_pre::getAsFloat}:
        return {_scale}
    set {_pre} to new proxy instance of FloatSupplier using {_pre::*}

    create section with {_spl} stored in {_m::get}:
        return new Vector3f({_location}.x,-50000 + {_location}.y,{_location}.z)
    set {_spl} to new proxy instance of Supplier using {_m::*}

    set {_e} to addHud({_p},{_id},{_location},vector(0,0,0),stone)
    set {_m} to BetterModel.model({_model}).orElse(null)
    set {_r} to {_m}.create({_e})
    set {_pipe} to {_r}.getPipeline()
    if {_p} is a player:
        loop all players where [input is not {_p}]:
            {_pipe}.hide(loop-player)
    {_pipe}.defaultPosition({_spl})
    {_pipe}.scale({_pre})
    {_r}.animate({_string})
    return {_r}

허드는 기본적으로 그림자가 제거되므로 -30000 ( center aligned ) 에서 사용시 부자연스럽게 보입니다. 따라서 -40000 범위를 감지하는 구문을 hud.glsl에 추가해야합니다

Global Hud

특정 허드를 가진 엔티티가 각 플레이어에게 탑승하는 패킷을 보내서 허드의 위치를 고정합니다

실제 엔티티까지의 거리가 엔티티 가시거리를 넘어서면 허드가 사라집니다

1인칭 허드

허드가 1인칭에서만 표시되도록 합니다

대부분의 엔티티 가시거리 설정(클라이언트)에서 작동합니다

완벽하게 3인칭에서 허드를 숨기려면 unit을 매우 낮은값으로 수정하고 hud.glsl에서 x,z의 최댓값을 제한하는 조건을 추가하세요

Last updated