mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-12-22 16:48:25 +01:00
Merge branch 'refs/heads/main' into update/1.20.5
# Conflicts: # .github/workflows/build.yml # gradle.properties # src/main/resources/assets/viafabricplus/lang/zh_tw.json
This commit is contained in:
commit
971ad3241a
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v2
|
||||
uses: gradle/actions/wrapper-validation@v3
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
@ -17,7 +17,7 @@ jobs:
|
||||
check-latest: true
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
- name: Upload Artifacts
|
||||
- name: Upload Artifacts to GitHub
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Artifacts
|
||||
|
@ -66,17 +66,21 @@ public class ViaFabricPlus {
|
||||
private CompletableFuture<Void> loadingFuture;
|
||||
|
||||
@SuppressWarnings("ResultOfMethodCallIgnored")
|
||||
public void bootstrap() {
|
||||
public void init() {
|
||||
directory.mkdir();
|
||||
ClassLoaderPriorityUtil.loadOverridingJars(directory); // Load overriding jars first so other code can access the new classes
|
||||
|
||||
settingsManager = new SettingsManager();
|
||||
saveManager = new SaveManager(settingsManager);
|
||||
|
||||
ClientsideFixes.init(); // Init clientside related fixes
|
||||
loadingFuture = ProtocolTranslator.init(directory); // Init ViaVersion protocol translator platform
|
||||
|
||||
PostGameLoadCallback.EVENT.register(() -> loadingFuture.join()); // Block game loading until ViaVersion has loaded
|
||||
settingsManager = new SettingsManager();
|
||||
saveManager = new SaveManager(settingsManager);
|
||||
|
||||
// Block game loading until ViaVersion has loaded
|
||||
PostGameLoadCallback.EVENT.register(() -> {
|
||||
loadingFuture.join();
|
||||
saveManager.init();
|
||||
});
|
||||
}
|
||||
|
||||
public static ViaFabricPlus global() {
|
||||
|
@ -33,7 +33,7 @@ public abstract class MixinMain {
|
||||
@Inject(method = "main", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;startTimerHack()V"))
|
||||
private static void bootstrap(CallbackInfo ci) {
|
||||
LoadCallback.EVENT.invoker().onLoad(LoadCallback.State.PRE);
|
||||
ViaFabricPlus.global().bootstrap();
|
||||
ViaFabricPlus.global().init();
|
||||
LoadCallback.EVENT.invoker().onLoad(LoadCallback.State.POST);
|
||||
}
|
||||
|
||||
|
@ -180,6 +180,15 @@ public abstract class MixinLivingEntity extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/MathHelper;abs(F)F"))
|
||||
private float alwaysRotateWhenWalkingBackwards(float value) {
|
||||
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_11_1)) {
|
||||
return 0F;
|
||||
} else {
|
||||
return MathHelper.abs(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "getPreferredEquipmentSlot", at = @At("HEAD"), cancellable = true)
|
||||
private static void removeShieldSlotPreference(ItemStack stack, CallbackInfoReturnable<EquipmentSlot> cir) {
|
||||
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_9_3) && stack.isOf(Items.SHIELD)) {
|
||||
|
@ -43,7 +43,9 @@ public class SaveManager {
|
||||
settingsSave = new SettingsSave(settingsManager),
|
||||
accountsSave = new AccountsSave()
|
||||
);
|
||||
}
|
||||
|
||||
public void init() {
|
||||
// Load save files
|
||||
for (AbstractSave save : saves) {
|
||||
save.init();
|
||||
|
@ -44,9 +44,10 @@
|
||||
"general_settings.viafabricplus.ignore_packet_translation_errors": "忽略封包轉換錯誤",
|
||||
"general_settings.viafabricplus.load_skins_and_skulls_in_legacy_versions": "在舊版中載入外觀和頭顱",
|
||||
"general_settings.viafabricplus.emulate_inventory_actions_in_alpha_versions": "模擬 Alpha 版本物品欄動作",
|
||||
"general_settings.viafabricplus.direct_connect_screen_button_orientation": "直接連缐 熒幕的按鈕方位",
|
||||
"general_settings.viafabricplus.direct_connect_screen_button_orientation": "直接連線畫面按鈕方向",
|
||||
|
||||
"bedrock_settings.viafabricplus.click_to_set_bedrock_account": "點擊以設定 Bedrock 版帳號",
|
||||
"bedrock_settings.viafabricplus.replace_default_port": "在伺服器清單中取代預設連線埠",
|
||||
|
||||
"debug_settings.viafabricplus.queue_config_packets": "佇列設定封包",
|
||||
"debug_settings.viafabricplus.disable_sequencing": "停用排序",
|
||||
@ -56,11 +57,11 @@
|
||||
"debug_settings.viafabricplus.send_open_inventory_packet": "發送開啟物品欄封包",
|
||||
"debug_settings.viafabricplus.remove_cooldowns": "移除冷卻時間",
|
||||
"debug_settings.viafabricplus.send_idle_packet": "發送閒置封包",
|
||||
"debug_settings.viafabricplus.replace_sneaking": "替換潛行",
|
||||
"debug_settings.viafabricplus.replace_sneaking": "取代潛行",
|
||||
"debug_settings.viafabricplus.long_sneaking": "長時間潛行",
|
||||
"debug_settings.viafabricplus.legacy_mining_speeds": "舊版挖礦速度",
|
||||
"debug_settings.viafabricplus.prevent_entity_cramming": "阻止實體擠壓",
|
||||
"debug_settings.viafabricplus.always_tick_client_player": "始終執行客戶端玩家刻",
|
||||
"debug_settings.viafabricplus.always_tick_client_player": "一律執行用戶端玩家刻",
|
||||
|
||||
"authentication_settings.viafabricplus.use_beta_craft_authentication": "使用 BetaCraft 驗證",
|
||||
"authentication_settings.viafabricplus.verify_session_for_online_mode": "允許 ViaLegacy 調用 joinServer() 來驗證 session",
|
||||
@ -70,16 +71,17 @@
|
||||
"visual_settings.viafabricplus.disable_secure_chat_warning": "停用受保護的聊天內容警告",
|
||||
"visual_settings.viafabricplus.hide_signature_indicator": "隱藏簽章指示器",
|
||||
"visual_settings.viafabricplus.remove_newer_features_from_jigsaw_screen": "從拼圖方塊畫面中移除較新的功能",
|
||||
"visual_settings.viafabricplus.replace_petrified_oak_slab": "替換石化橡木半磚",
|
||||
"visual_settings.viafabricplus.replace_petrified_oak_slab": "取代石化橡木半磚",
|
||||
"visual_settings.viafabricplus.emulate_armor_hud": "模擬盔甲 HUD",
|
||||
"visual_settings.viafabricplus.remove_newer_features_from_command_block_screen": "從指令方塊畫面中移除較新的功能",
|
||||
"visual_settings.viafabricplus.replace_hurt_sound_with_oof_sound": "將受傷聲音替換為 OOF 音效",
|
||||
"visual_settings.viafabricplus.replace_hurt_sound_with_oof_sound": "將受傷聲音取代為 OOF 音效",
|
||||
"visual_settings.viafabricplus.remove_newer_hud_elements": "移除較新的 HUD 元素",
|
||||
"visual_settings.viafabricplus.replace_creative_inventory_with_classic_inventory": "替換創造模式物品欄",
|
||||
"visual_settings.viafabricplus.replace_creative_inventory_with_classic_inventory": "取代創造模式物品欄",
|
||||
"visual_settings.viafabricplus.old_walking_animation": "舊的行走動畫",
|
||||
"visual_settings.viafabricplus.change_font_renderer_behaviour": "變更字型渲染器行為",
|
||||
"visual_settings.viafabricplus.enable_sword_blocking": "啟用 1.8 劍阻擋動畫",
|
||||
"visual_settings.viafabricplus.enable_block_hit_animation": "啟用 1.7 阻擋攻擊動畫",
|
||||
"visual_settings.viafabricplus.disable_server_pinging": "禁用伺服器 pinging",
|
||||
|
||||
"bedrock.viafabricplus.login": "你的瀏覽器應該已經開啟。\n請輸入以下代碼:%s\n關閉此畫面將取消流程!",
|
||||
"bedrock.viafabricplus.confirm_transfer_server_prompt": "你確定要轉移到以下伺服器?\n%s\n\n這將中斷目前伺服器的連線並連線到新的伺服器。",
|
||||
@ -96,9 +98,9 @@
|
||||
"classic4j_library.viafabricplus.error.verification": "使用者尚未驗證電子郵件地址。",
|
||||
"classic4j_library.viafabricplus.error.logincode": "要求多重要素驗證。請檢查你的電子郵件。",
|
||||
|
||||
"report.viafabricplus.button": "報告問題",
|
||||
"report.viafabricplus.bug_report": "在 GitHub 上報告 Bug",
|
||||
"report.viafabricplus.button": "回報問題",
|
||||
"report.viafabricplus.bug_report": "在 GitHub 上回報 Bug",
|
||||
"report.viafabricplus.feature_request": "在 Github 上請求新功能",
|
||||
"report.viafabricplus.create_via_dump": "創建一個 ViaVersion Dump,用於報告問題時收集訊息",
|
||||
"report.viafabricplus.open_logs": "打開游戲日志目錄"
|
||||
"report.viafabricplus.create_via_dump": "建立一個 ViaVersion Dump,用於回報問題時收集資訊",
|
||||
"report.viafabricplus.open_logs": "開啟遊戲日誌目錄"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user