Skip to content

Commit 9b5f7d1

Browse files
committed
feat: add hudStatusEffectsShift to disable the status effects shifting of text
1 parent 02aa122 commit 9b5f7d1

File tree

9 files changed

+34
-8
lines changed

9 files changed

+34
-8
lines changed

src/main/java/fi/dy/masa/minihud/config/Configs.java

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public static class Generic
6969
public static final ConfigDouble FONT_SCALE = new ConfigDouble("fontScale", 0.5, 0.01, 100.0).apply(GENERIC_KEY);
7070
public static final ConfigOptionList HUD_ALIGNMENT = new ConfigOptionList("hudAlignment", HudAlignment.TOP_LEFT).apply(GENERIC_KEY);
7171
public static final ConfigBooleanHotkeyed HUD_DATA_SYNC = new ConfigBooleanHotkeyed("hudDataSync", false, "").apply(GENERIC_KEY);
72+
public static final ConfigBooleanHotkeyed HUD_STATUS_EFFECTS_SHIFT = new ConfigBooleanHotkeyed("hudStatusEffectsShift",true, "").apply(GENERIC_KEY);
7273
public static final ConfigBoolean INFO_LINES_USES_NBT = new ConfigBoolean("infoLinesUsesNbt", true).apply(GENERIC_KEY);
7374
public static final ConfigHotkey INVENTORY_PREVIEW = new ConfigHotkey("inventoryPreview", "LEFT_ALT", KeybindSettings.PRESS_ALLOWEXTRA).apply(GENERIC_KEY);
7475
public static final ConfigBoolean INVENTORY_PREVIEW_ENABLED = new ConfigBoolean("inventoryPreviewEnabled", false).apply(GENERIC_KEY);
@@ -212,6 +213,7 @@ public static class Generic
212213
DURATION_FORMAT_TYPE,
213214
DURATION_FORMAT_STRING,
214215
FONT_SCALE,
216+
HUD_STATUS_EFFECTS_SHIFT,
215217
LIGHT_LEVEL_MARKER_SIZE,
216218
LIGHT_LEVEL_NUMBER_OFFSET_BLOCK_X,
217219
LIGHT_LEVEL_NUMBER_OFFSET_BLOCK_Y,
@@ -243,6 +245,7 @@ public static class Generic
243245
public static final List<IHotkey> HOTKEY_LIST = ImmutableList.of(
244246
MAIN_RENDERING_TOGGLE,
245247
HUD_DATA_SYNC,
248+
HUD_STATUS_EFFECTS_SHIFT,
246249
ENTITY_DATA_SYNC,
247250
MOVE_SHAPE_TO_PLAYER,
248251
OPEN_CONFIG_GUI,

src/main/java/fi/dy/masa/minihud/event/RenderHandler.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ public void onRenderGameOverlayPost(DrawContext drawContext)
178178
boolean useBackground = Configs.Generic.USE_TEXT_BACKGROUND.getBooleanValue();
179179
boolean useShadow = Configs.Generic.USE_FONT_SHADOW.getBooleanValue();
180180

181-
RenderUtils.renderText(x, y, Configs.Generic.FONT_SCALE.getDoubleValue(), textColor, bgColor, alignment, useBackground, useShadow, this.lines, drawContext);
181+
RenderUtils.renderText(x, y, Configs.Generic.FONT_SCALE.getDoubleValue(), textColor, bgColor, alignment,
182+
useBackground, useShadow, Configs.Generic.HUD_STATUS_EFFECTS_SHIFT.getBooleanValue(),
183+
this.lines, drawContext);
182184
}
183185

184186
if (Configs.Generic.INVENTORY_PREVIEW_ENABLED.getBooleanValue() &&

src/main/resources/assets/minihud/lang/en_us.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
"minihud.config.generic.comment.honeyTooltips": "Adds the honey level to the tooltip of Bee Hive and Bee Nest items",
115115
"minihud.config.generic.comment.hudAlignment": "The alignment of the info line HUD",
116116
"minihud.config.generic.comment.hudDataSync": "Use the HUD Data Sync protocol from Servux\nto obtain various Info Line Data from the server.\nThis is used by settings such as \"infoWeather\",\n\"infoFurnaceXP\", and can get the World Seed and Spawn Chunk\ninformation; because they are not entity data\nor structure-related.",
117+
"minihud.config.generic.comment.hudStatusEffectsShift": "Enable the shifting of text lines rendering on the\nTOP_RIGHT while Status Effects are active.\nIf this is disabled, status effects may\ncover up the text at the top right.\nThis is meant for special cases when various\nGUI or Inventory mods modify the location\nof the vanilla Status Effects.",
117118
"minihud.config.generic.comment.infoLinesUsesNbt": "Force the Info Lines data to strictly use the Raw NBT data.\nThis setting helps ensure compatibility with\nother mods by relying ONLY on obtained NBT tags.",
118119
"minihud.config.generic.comment.inventoryPreview": "The key to activate the inventory preview feature",
119120
"minihud.config.generic.comment.inventoryPreviewEnabled": "Enable/Disable the Inventory Preview Feature\nMade so you can individually enable / disable this feature",
@@ -215,6 +216,7 @@
215216
"minihud.config.generic.name.honeyTooltips": "honeyTooltips",
216217
"minihud.config.generic.name.hudAlignment": "hudAlignment",
217218
"minihud.config.generic.name.hudDataSync": "hudDataSync",
219+
"minihud.config.generic.name.hudStatusEffectsShift": "hudStatusEffectsShift",
218220
"minihud.config.generic.name.infoLinesUsesNbt": "infoLinesUsesNbt",
219221
"minihud.config.generic.name.inventoryPreview": "inventoryPreview",
220222
"minihud.config.generic.name.inventoryPreviewEnabled": "inventoryPreviewEnabled",
@@ -282,6 +284,7 @@
282284
"minihud.config.generic.name.villagerOfferPriceThreshold": "villagerOfferPriceThreshold",
283285
"minihud.config.generic.prettyName.entityDataSync": "Entity Data Sync",
284286
"minihud.config.generic.prettyName.hudDataSync": "HUD Data Sync",
287+
"minihud.config.generic.prettyName.hudStatusEffectsShift": "HUD Status Effects Shift",
285288
"minihud.config.generic.prettyName.mainRenderingToggle": "MiniHUD Main Rendering",
286289
"minihud.config.info_toggle.comment.infoBeeCount": "Show the number of bees in the targeted Hive or Nest.",
287290
"minihud.config.info_toggle.comment.infoBiome": "Show the name of the current biome",
@@ -990,4 +993,4 @@
990993
"minihud.message.toggled_using_player_spawn": "Toggled %s %s, Simulation distance %s",
991994
"minihud.message.toggled_using_position": "Toggled %s %s, using the position %s",
992995
"minihud.message.toggled_using_world_spawn": "Toggled %s %s, World spawn %s"
993-
}
996+
}

src/main/resources/assets/minihud/lang/ja_jp.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
"minihud.config.generic.comment.honeyTooltips": "Adds the honey level to the tooltip of Bee Hive and Bee Nest items",
115115
"minihud.config.generic.comment.hudAlignment": "The alignment of the info line HUD",
116116
"minihud.config.generic.comment.hudDataSync": "Use the HUD Data Sync protocol from Servux\nto obtain various Info Line Data from the server.\nThis is used by settings such as \"infoWeather\",\n\"infoFurnaceXP\", and can get the World Seed and Spawn Chunk\ninformation; because they are not entity data\nor structure-related.",
117+
"minihud.config.generic.comment.hudStatusEffectsShift": "Enable the shifting of text lines rendering on the\nTOP_RIGHT while Status Effects are active.\nIf this is disabled, status effects may\ncover up the text at the top right.\nThis is meant for special cases when various\nGUI or Inventory mods modify the location\nof the vanilla Status Effects.",
117118
"minihud.config.generic.comment.infoLinesUsesNbt": "Force the Info Lines data to strictly use the Raw NBT data.\nThis setting helps ensure compatibility with\nother mods by relying ONLY on obtained NBT tags.",
118119
"minihud.config.generic.comment.inventoryPreview": "The key to activate the inventory preview feature",
119120
"minihud.config.generic.comment.inventoryPreviewEnabled": "Enable/Disable the Inventory Preview Feature\nMade so you can individually enable / disable this feature",
@@ -215,6 +216,7 @@
215216
"minihud.config.generic.name.honeyTooltips": "honeyTooltips",
216217
"minihud.config.generic.name.hudAlignment": "hudAlignment",
217218
"minihud.config.generic.name.hudDataSync": "hudDataSync",
219+
"minihud.config.generic.name.hudStatusEffectsShift": "hudStatusEffectsShift",
218220
"minihud.config.generic.name.infoLinesUsesNbt": "infoLinesUsesNbt",
219221
"minihud.config.generic.name.inventoryPreview": "inventoryPreview",
220222
"minihud.config.generic.name.inventoryPreviewEnabled": "inventoryPreviewEnabled",
@@ -282,6 +284,7 @@
282284
"minihud.config.generic.name.villagerOfferPriceThreshold": "villagerOfferPriceThreshold",
283285
"minihud.config.generic.prettyName.entityDataSync": "Entity Data Sync",
284286
"minihud.config.generic.prettyName.hudDataSync": "HUD Data Sync",
287+
"minihud.config.generic.prettyName.hudStatusEffectsShift": "HUD Status Effects Shift",
285288
"minihud.config.generic.prettyName.mainRenderingToggle": "MiniHUD Main Rendering",
286289
"minihud.config.info_toggle.comment.infoBeeCount": "Show the number of bees in the targeted Hive or Nest.",
287290
"minihud.config.info_toggle.comment.infoBiome": "Show the name of the current biome",
@@ -990,4 +993,4 @@
990993
"minihud.message.toggled_using_player_spawn": "Toggled %s %s, Simulation distance %s",
991994
"minihud.message.toggled_using_position": "Toggled %s %s, using the position %s",
992995
"minihud.message.toggled_using_world_spawn": "Toggled %s %s, World spawn %s"
993-
}
996+
}

src/main/resources/assets/minihud/lang/ko_kr.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
"minihud.config.generic.comment.honeyTooltips": "벌집 및 벌통의 툴팁에 꿀 레벨을 추가합니다.",
115115
"minihud.config.generic.comment.hudAlignment": "정보 라인 HUD의 정렬 위치입니다.",
116116
"minihud.config.generic.comment.hudDataSync": "Servux의 HUD 데이터 동기화 프로토콜을 사용하여\n서버에서 다양한 정보 라인 데이터를 가져옵니다.\n이는 \"정보 날씨\", \"정보 화로 경험치\"와 같은\n설정에서 사용되며, 월드 시 및 스폰 청크 정보를 가져올 수 있습니다.\n왜냐하면 그것들은 엔티티 데이터나 구조물과 관련이 없기 때문입니다.",
117+
"minihud.config.generic.comment.hudStatusEffectsShift": "Enable the shifting of text lines rendering on the\nTOP_RIGHT while Status Effects are active.\nIf this is disabled, status effects may\ncover up the text at the top right.\nThis is meant for special cases when various\nGUI or Inventory mods modify the location\nof the vanilla Status Effects.",
117118
"minihud.config.generic.comment.infoLinesUsesNbt": "정보 라인 데이터가 Raw NBT 데이터만을 사용하도록 강제합니다.\n이 설정은 획득한 NBT 태그에만 의존하여\n다른 모드와의 호환성을 보장하는 데 도움이 됩니다.",
118119
"minihud.config.generic.comment.inventoryPreview": "보관함 미리보기 기능을 활성화하는 키입니다.",
119120
"minihud.config.generic.comment.inventoryPreviewEnabled": "보관함 미리보기 기능 활성화/비활성화입니다.\n이 기능을 개별적으로 활성화/비활성화할 수 있도록 만들었습니다.",
@@ -215,6 +216,7 @@
215216
"minihud.config.generic.name.honeyTooltips": "꿀 툴팁",
216217
"minihud.config.generic.name.hudAlignment": "HUD 정렬",
217218
"minihud.config.generic.name.hudDataSync": "HUD 데이터 동기화",
219+
"minihud.config.generic.name.hudStatusEffectsShift": "hudStatusEffectsShift",
218220
"minihud.config.generic.name.infoLinesUsesNbt": "정보 라인 NBT 사용",
219221
"minihud.config.generic.name.inventoryPreview": "보관함 미리보기",
220222
"minihud.config.generic.name.inventoryPreviewEnabled": "보관함 미리보기 활성화",
@@ -282,6 +284,7 @@
282284
"minihud.config.generic.name.villagerOfferPriceThreshold": "주민 제공 가격 임계값",
283285
"minihud.config.generic.prettyName.entityDataSync": "엔티티 데이터 동기화",
284286
"minihud.config.generic.prettyName.hudDataSync": "HUD 데이터 동기화",
287+
"minihud.config.generic.prettyName.hudStatusEffectsShift": "HUD Status Effects Shift",
285288
"minihud.config.generic.prettyName.mainRenderingToggle": "MiniHUD 메인 렌더링",
286289
"minihud.config.info_toggle.comment.infoBeeCount": "바라보는 벌집이나 벌통에 있는 꿀벌의 수를 표시합니다.",
287290
"minihud.config.info_toggle.comment.infoBiome": "현재 생물군계의 이름을 표시합니다.",
@@ -990,4 +993,4 @@
990993
"minihud.message.toggled_using_player_spawn": "토글 %s %s, 시뮬레이션 거리 %s",
991994
"minihud.message.toggled_using_position": "토글 %s %s, 위치 %s",
992995
"minihud.message.toggled_using_world_spawn": "토글 %s %s, 월드 스폰 %s"
993-
}
996+
}

src/main/resources/assets/minihud/lang/ru_ru.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
"minihud.config.generic.comment.honeyTooltips": "Adds the honey level to the tooltip of Bee Hive and Bee Nest items",
115115
"minihud.config.generic.comment.hudAlignment": "The alignment of the info line HUD",
116116
"minihud.config.generic.comment.hudDataSync": "Use the HUD Data Sync protocol from Servux\nto obtain various Info Line Data from the server.\nThis is used by settings such as \"infoWeather\",\n\"infoFurnaceXP\", and can get the World Seed and Spawn Chunk\ninformation; because they are not entity data\nor structure-related.",
117+
"minihud.config.generic.comment.hudStatusEffectsShift": "Enable the shifting of text lines rendering on the\nTOP_RIGHT while Status Effects are active.\nIf this is disabled, status effects may\ncover up the text at the top right.\nThis is meant for special cases when various\nGUI or Inventory mods modify the location\nof the vanilla Status Effects.",
117118
"minihud.config.generic.comment.infoLinesUsesNbt": "Force the Info Lines data to strictly use the Raw NBT data.\nThis setting helps ensure compatibility with\nother mods by relying ONLY on obtained NBT tags.",
118119
"minihud.config.generic.comment.inventoryPreview": "The key to activate the inventory preview feature",
119120
"minihud.config.generic.comment.inventoryPreviewEnabled": "Enable/Disable the Inventory Preview Feature\nMade so you can individually enable / disable this feature",
@@ -215,6 +216,7 @@
215216
"minihud.config.generic.name.honeyTooltips": "honeyTooltips",
216217
"minihud.config.generic.name.hudAlignment": "hudAlignment",
217218
"minihud.config.generic.name.hudDataSync": "hudDataSync",
219+
"minihud.config.generic.name.hudStatusEffectsShift": "hudStatusEffectsShift",
218220
"minihud.config.generic.name.infoLinesUsesNbt": "infoLinesUsesNbt",
219221
"minihud.config.generic.name.inventoryPreview": "inventoryPreview",
220222
"minihud.config.generic.name.inventoryPreviewEnabled": "inventoryPreviewEnabled",
@@ -282,6 +284,7 @@
282284
"minihud.config.generic.name.villagerOfferPriceThreshold": "villagerOfferPriceThreshold",
283285
"minihud.config.generic.prettyName.entityDataSync": "Entity Data Sync",
284286
"minihud.config.generic.prettyName.hudDataSync": "HUD Data Sync",
287+
"minihud.config.generic.prettyName.hudStatusEffectsShift": "HUD Status Effects Shift",
285288
"minihud.config.generic.prettyName.mainRenderingToggle": "MiniHUD Main Rendering",
286289
"minihud.config.info_toggle.comment.infoBeeCount": "Show the number of bees in the targeted Hive or Nest.",
287290
"minihud.config.info_toggle.comment.infoBiome": "Show the name of the current biome",
@@ -990,4 +993,4 @@
990993
"minihud.message.toggled_using_player_spawn": "Toggled %s %s, Simulation distance %s",
991994
"minihud.message.toggled_using_position": "Toggled %s %s, using the position %s",
992995
"minihud.message.toggled_using_world_spawn": "Toggled %s %s, World spawn %s"
993-
}
996+
}

src/main/resources/assets/minihud/lang/uk_ua.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
"minihud.config.generic.comment.honeyTooltips": "Adds the honey level to the tooltip of Bee Hive and Bee Nest items",
115115
"minihud.config.generic.comment.hudAlignment": "The alignment of the info line HUD",
116116
"minihud.config.generic.comment.hudDataSync": "Use the HUD Data Sync protocol from Servux\nto obtain various Info Line Data from the server.\nThis is used by settings such as \"infoWeather\",\n\"infoFurnaceXP\", and can get the World Seed and Spawn Chunk\ninformation; because they are not entity data\nor structure-related.",
117+
"minihud.config.generic.comment.hudStatusEffectsShift": "Enable the shifting of text lines rendering on the\nTOP_RIGHT while Status Effects are active.\nIf this is disabled, status effects may\ncover up the text at the top right.\nThis is meant for special cases when various\nGUI or Inventory mods modify the location\nof the vanilla Status Effects.",
117118
"minihud.config.generic.comment.infoLinesUsesNbt": "Force the Info Lines data to strictly use the Raw NBT data.\nThis setting helps ensure compatibility with\nother mods by relying ONLY on obtained NBT tags.",
118119
"minihud.config.generic.comment.inventoryPreview": "The key to activate the inventory preview feature",
119120
"minihud.config.generic.comment.inventoryPreviewEnabled": "Enable/Disable the Inventory Preview Feature\nMade so you can individually enable / disable this feature",
@@ -215,6 +216,7 @@
215216
"minihud.config.generic.name.honeyTooltips": "honeyTooltips",
216217
"minihud.config.generic.name.hudAlignment": "hudAlignment",
217218
"minihud.config.generic.name.hudDataSync": "hudDataSync",
219+
"minihud.config.generic.name.hudStatusEffectsShift": "hudStatusEffectsShift",
218220
"minihud.config.generic.name.infoLinesUsesNbt": "infoLinesUsesNbt",
219221
"minihud.config.generic.name.inventoryPreview": "inventoryPreview",
220222
"minihud.config.generic.name.inventoryPreviewEnabled": "inventoryPreviewEnabled",
@@ -282,6 +284,7 @@
282284
"minihud.config.generic.name.villagerOfferPriceThreshold": "villagerOfferPriceThreshold",
283285
"minihud.config.generic.prettyName.entityDataSync": "Entity Data Sync",
284286
"minihud.config.generic.prettyName.hudDataSync": "HUD Data Sync",
287+
"minihud.config.generic.prettyName.hudStatusEffectsShift": "HUD Status Effects Shift",
285288
"minihud.config.generic.prettyName.mainRenderingToggle": "MiniHUD Main Rendering",
286289
"minihud.config.info_toggle.comment.infoBeeCount": "Show the number of bees in the targeted Hive or Nest.",
287290
"minihud.config.info_toggle.comment.infoBiome": "Show the name of the current biome",
@@ -990,4 +993,4 @@
990993
"minihud.message.toggled_using_player_spawn": "Toggled %s %s, Simulation distance %s",
991994
"minihud.message.toggled_using_position": "Toggled %s %s, using the position %s",
992995
"minihud.message.toggled_using_world_spawn": "Toggled %s %s, World spawn %s"
993-
}
996+
}

0 commit comments

Comments
 (0)