🧩 アーキテクチャとMixin詳細
| パラメータ | 技術的仕様 |
|---|---|
| Root Package | net.vanillaoutsider.bedchathider |
| Mixin Configuration | vanilla-outsider-bed-chat-hider.mixins.json |
| Compatibility Level | JAVA_25 |
| Default Require Count | 1 (injectors.defaultRequire: 1) |
🏛️ クラスアーキテクチャ概要
[ BedChatHiderClient ]
(ClientModInitializer)
│
┌───────────────┴───────────────┐
▼ ▼
[ InBedChatScreenMixin ] [ ChatScreenMixin ]
(Widget & Layout Injection) (Input & Render Gating)
│ │
▼ ▼
「ベッドから出る」位置変更と「チャット非表示」ボタン追加 チャット描画・キー・クリック・スクロールのバイパス🔍 Mixin 注入インベントリ詳細
1. InBedChatScreenMixin (InBedChatScreen.class)
- 対象メソッド:
init() - 注入ポイント:
@At("TAIL") - 実行処理:
leaveBedButtonの幅を $200\text{px}$ から $98\text{px}$ に変更し、$X = W/2 - 100$ に配置。- $X = W/2 + 2, Y = H - 40$ に $98\text{px}$ のトグル
Buttonを追加。 bedchathider$updateChatState()を介してinputの可視性とフォーカス状態を同期。
2. ChatScreenMixin (ChatScreen.class)
- 対象メソッド 1:
extractRenderState(GuiGraphicsExtractor, int, int, float, CallbackInfo)@At("HEAD"),cancellable = trueInBedChatScreenでhideChatが true の場合:super.extractRenderStateを呼び出し、ChatScreenの描画をキャンセル。
- 対象メソッド 2:
keyPressed(KeyEvent, CallbackInfoReturnable<Boolean>)@At("HEAD"),cancellable = truesuper.keyPressed(event)に再ルーティングし、チャット入力と矢印キーナビゲーションを無効化。
- 対象メソッド 3:
mouseClicked(MouseButtonEvent, boolean, CallbackInfoReturnable<Boolean>)@At("HEAD"),cancellable = truesuper.mouseClicked(event, doubleClick)に再ルーティングし、チャット URL クリックを無効化。
- 対象メソッド 4:
mouseScrolled(double, double, double, double, CallbackInfoReturnable<Boolean>)@At("HEAD"),cancellable = truesuper.mouseScrolled(x, y, scrollX, scrollY)に再ルーティングし、ログのスクロールを無効化。
関連ページ: ホーム | ベッド画面UIとレイアウト | チャット表示と入力ブロック
