Skip to content

Implement multi block place preview and complete the initial rendering work of the Celestial Forging Anvil 实现大方块放置预览和完成锻星砧初期渲染工作#3381

Draft
burin-ljx wants to merge 11 commits intoAnvil-Dev:dev/1.21/1.6from
burin-ljx:large_block_preview

Conversation

@burin-ljx
Copy link
Copy Markdown
Contributor

@burin-ljx burin-ljx commented Mar 30, 2026

- 新增 CelestialForgingAnvilBlock 类实现多部分块结构
- 添加 CelestialForgingAnvilBlockEntity 实现客户端旋转动画
- 实现 CelestialForgingAnvilBlockEntityRenderer 渲染器
- 注册cfa实体类型和渲染器
- 添加cfa状态定义和资源文件
- 更新合成配方使用切割燧石块替代抛光燧石块
- 添加cfa掉落表和物品模型
- 将FlexibleMultiPartBlockItem和SimpleMultiPartBlockItem中的getMaxOffsetDistance方法改为public
- 在方块放置失败时触发渲染高亮事件的冷却机制
- 新增RenderHighlightEventListener类处理客户端渲染高亮逻辑
- 新增InputEventListener类跟踪玩家当前选中的物品
- 新增SegmentedActuator工具类用于分段执行动画任务
- 实现多部件方块放置预览和错误位置高亮显示功能
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements a client-side placement preview outline for multi-part (“large”) blocks, including a failure flash animation and per-block error outlines to help players understand why placement fails.

Changes:

  • Added a RenderHighlightEvent listener to render a combined outline for multipart blocks and red outlines for blocking positions.
  • Added a small segmented “actuator” utility to drive the failure flash animation.
  • Updated multipart block items to attempt offset placement and trigger the failure animation when placement still fails.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/main/java/dev/dubhe/anvilcraft/util/SegmentedActuator.java New utility to sequence tick-based tasks for the failure flash animation.
src/main/java/dev/dubhe/anvilcraft/integration/jei/category/multiblock/MultiBlockCraftingCategory.java Minor cleanup (remove unused import, make local Minecraft reference final).
src/main/java/dev/dubhe/anvilcraft/client/event/RenderHighlightEventListener.java New client event handler rendering placement preview outlines + failure/error visuals.
src/main/java/dev/dubhe/anvilcraft/block/item/SimpleMultiPartBlockItem.java Exposes max-offset helper and triggers failure animation when placement still fails.
src/main/java/dev/dubhe/anvilcraft/block/item/FlexibleMultiPartBlockItem.java Exposes max-offset helper, triggers failure animation, and uses placement state for offset attempt.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@burin-ljx burin-ljx marked this pull request as draft March 30, 2026 14:03
@burin-ljx burin-ljx marked this pull request as ready for review April 1, 2026 09:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@burin-ljx burin-ljx marked this pull request as draft April 9, 2026 14:08
import dev.dubhe.anvilcraft.block.state.IFlexibleMultiPartBlockState;
import dev.dubhe.anvilcraft.client.event.LargeBlockPlacePreviewEventListener;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import lombok.Getter;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [Checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck> reported by reviewdog 🐶
'java.util.List' should be separated from previous import group by one line.

@burin-ljx burin-ljx changed the title Implement multi block place preview 实现大方块放置预览 Implement multi block place preview and complete the initial rendering work of the Celestial Forging Anvil 实现大方块放置预览和完成锻星砧初期渲染工作 Apr 10, 2026
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

Successfully merging this pull request may close these issues.

[Bug] 磨制燧石块可以制成切制燧石半砖 [TODO] 锻星砧基础渲染 [TODO] 锻星砧前置工作 [TODO] 大型方块放置预览

2 participants