Skip to content

🧩 アーキテクチャとMixin詳細

パラメータ技術的仕様
Root Packagenet.vanillaoutsider.bedchathider
Mixin Configurationvanilla-outsider-bed-chat-hider.mixins.json
Compatibility LevelJAVA_25
Default Require Count1 (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 = true
    • InBedChatScreenhideChat が true の場合:super.extractRenderState を呼び出し、ChatScreen の描画をキャンセル。
  • 対象メソッド 2: keyPressed(KeyEvent, CallbackInfoReturnable<Boolean>)
    • @At("HEAD"), cancellable = true
    • super.keyPressed(event) に再ルーティングし、チャット入力と矢印キーナビゲーションを無効化。
  • 対象メソッド 3: mouseClicked(MouseButtonEvent, boolean, CallbackInfoReturnable<Boolean>)
    • @At("HEAD"), cancellable = true
    • super.mouseClicked(event, doubleClick) に再ルーティングし、チャット URL クリックを無効化。
  • 対象メソッド 4: mouseScrolled(double, double, double, double, CallbackInfoReturnable<Boolean>)
    • @At("HEAD"), cancellable = true
    • super.mouseScrolled(x, y, scrollX, scrollY) に再ルーティングし、ログのスクロールを無効化。

関連ページ: ホーム | ベッド画面UIとレイアウト | チャット表示と入力ブロック

Official documentation & web portal for Dasik Igaijinn mods.