Skip to content

feat: シフト右クリックによるタンク分離設置機能#48

Merged
turtton merged 2 commits into
mainfrom
feat/shift-isolated-tank-placement
May 9, 2026
Merged

feat: シフト右クリックによるタンク分離設置機能#48
turtton merged 2 commits into
mainfrom
feat/shift-isolated-tank-placement

Conversation

@turtton

@turtton turtton commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

シフト右クリックで非タンクブロックに設置した場合、隣接する既存タンクグループに接続されず、独立したグループとして配置される機能を追加。

変更内容

  • ConnectedTankPlacementContext: sneaking ThreadLocal 追加
  • BlockItemPlaceMixin: プレイヤーの isSecondaryUseActive() を記録
  • ConnectedTankBlock.setPlacedBy(): sneaking && interactedAt == null の場合に addIsolatedStorage() を使用
  • gametest 3 件追加(隣接分離、通常接続リグレッション、両隣分離)

テスト結果

バージョン テスト数 結果
1.21.8-fabric 42
1.21.11-fabric 42
1.21.11-neoforge 42

Closes #47

turtton added 2 commits May 10, 2026 00:02
When placing a tank by shift+right-clicking on a non-tank block,
the new tank is placed as an isolated group instead of connecting
to adjacent tanks. Clicking directly on a tank while sneaking still
connects to that tank's group via interactedAt.

Closes #47
- consumeSneaking() now calls remove() to prevent stale state leak
- Add block state CONNECTED_* assertions to sneaking isolation test
- Add regression test: sneaking does not leak to next normal placement
@turtton turtton merged commit 08df74d into main May 9, 2026
2 checks passed
@turtton turtton deleted the feat/shift-isolated-tank-placement branch May 9, 2026 15:57
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.

feat: シフト右クリックによるタンク分離設置機能

1 participant