搜索文档
RenderType 定义了方块的渲染类型,决定了方块在游戏中的视觉表现方式。
// 实体渲染类型 RenderType.solid() // 实心方块 RenderType.cutout() // 镂空方块(如树叶) RenderType.cutoutMipped() // 带 mipmap 的镂空 RenderType.translucent() // 半透明方块 RenderType.translucentMoving() // 动态半透明(如水流)
StartupEvents.registry('block', event => { event.create('custom_glass') .displayName('Custom Glass') .material('glass') .renderType('translucent') })