moved rest of the stuff. mixins needed still
This commit is contained in:
1 parent
394891ab5f
commit
5251bff2c7
10 files changed
+1075
-3
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.fakes.PlayerListHudInterface;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.hud.InGameHud;
|
||||
import net.minecraft.client.gui.hud.PlayerListHud;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(InGameHud.class)
|
||||
public abstract class InGameHudMixin
|
||||
{
|
||||
@Shadow
|
||||
@Final
|
||||
private MinecraftClient client;
|
||||
|
||||
@Shadow @Final private PlayerListHud playerListHud;
|
||||
|
||||
@Redirect(method = "draw", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/MinecraftClient;isInSingleplayer()Z"))
|
||||
private boolean onDraw(MinecraftClient minecraftClient)
|
||||
{
|
||||
return this.client.isInSingleplayer() && !((PlayerListHudInterface) playerListHud).hasFooterOrHeader();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user