removed broken mixin

This commit is contained in:
FlorianMichael 2023-03-18 01:51:09 +01:00
parent 9d1496e49f
commit d5f50cc01f
3 changed files with 3 additions and 40 deletions

View File

@ -1,6 +1,6 @@
/*
* This file is part of ViaFabricPlus - https://github.com/FlorianMichael/ViaFabricPlus
* Copyright (C) 2021-2023 FlorianMichael/EnZaXD and contributors
* Copyright (C) 2021-2023 FlorianMichael/MrLookAtMe (EnZaXD) and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.screen.hud;
package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.screen;
import de.florianmichael.viafabricplus.settings.groups.VisualSettings;
import net.minecraft.client.gui.hud.ChatHud;

View File

@ -1,36 +0,0 @@
/*
* This file is part of ViaFabricPlus - https://github.com/FlorianMichael/ViaFabricPlus
* Copyright (C) 2021-2023 FlorianMichael/EnZaXD and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.screen.hud;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import de.florianmichael.vialoadingbase.ViaLoadingBase;
import net.minecraft.client.gui.hud.ClientBossBar;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(targets = "net.minecraft.client.gui.hud.BossBarHud$1")
public class MixinBossBarHud_1 {
@Redirect(method = "updateProgress", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/ClientBossBar;setPercent(F)V"))
public void nullSafety(ClientBossBar instance, float percent) {
if (ViaLoadingBase.getClassWrapper().getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_8)) {
if (instance != null) instance.setPercent(percent);
}
}
}

View File

@ -102,8 +102,7 @@
"fixes.minecraft.screen.MixinGameModeSelectionScreen_GameModeSelection",
"fixes.minecraft.screen.MixinJigsawBlockScreen",
"fixes.minecraft.screen.MixinStructureBlockScreen_1",
"fixes.minecraft.screen.hud.MixinBossBarHud_1",
"fixes.minecraft.screen.hud.MixinChatHud",
"fixes.minecraft.screen.MixinChatHud",
"fixes.minecraft.screen.merchant.MixinMerchantScreen",
"fixes.minecraft.screen.merchant.MixinMerchantScreenHandler",
"fixes.minecraft.screen.screenhandler.MixinBrewingStandScreenHandler_FuelSlot",