Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

半透明方块渲染问题 #1

Open
xkball opened this issue Aug 6, 2022 · 4 comments
Open

半透明方块渲染问题 #1

xkball opened this issue Aug 6, 2022 · 4 comments

Comments

@xkball
Copy link

xkball commented Aug 6, 2022

(不会用英文)
原版的半透明方块(玻璃)在渲染时,两个相邻的同样方块直接不会渲染面
但是XKDeco没有做这样的处理
导致多个玻璃方块之间会渲染面,非常影响视觉效果(尤其是钢化玻璃一类)

从左到右为XKdeco的玻璃
原版玻璃
我的某个透明方块

经过查证

 @Override
    @SuppressWarnings("deprecation")
    public boolean skipRendering(@NotNull BlockState pState, @NotNull BlockState pAdjacentBlockState, @NotNull Direction pDirection) {
        return pAdjacentBlockState.is(this) || super.skipRendering(pState, pAdjacentBlockState, pDirection);
    }

在方块类中覆盖这个方法就可以解决

图为解决后的效果

不会用PR所以就发个issue了

@JieningYu
Copy link

这个仓库现在应该是搁置了
目前主要工作在
https://github.com/teaconmc/XKDeco
(1.18.2/1.19 forge)

@xkball
Copy link
Author

xkball commented Aug 6, 2022

这个仓库现在应该是搁置了 目前主要工作在 https://github.com/teaconmc/XKDeco (1.18.2/1.19 forge)

但是那个仓库发不了issue?

@3TUSK
Copy link

3TUSK commented Aug 6, 2022

我今天会处理这个问题。

3TUSK added a commit to teaconmc/XKDeco that referenced this issue Aug 6, 2022
@xkball
Copy link
Author

xkball commented Aug 6, 2022

我今天会处理这个问题。

www看了一眼果然你也忘了一点
台阶和半砖的形状不一定是完整的,如果边上方块没有完全遮住执行方法的方块就跳过渲染会少面)
你回复之前其实我就在试着用pr了但是你回复了我就没管 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants