Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoPortalOverlay #827

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/java/net/wurstclient/hack/HackList.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ public final class HackList implements UpdateListener
public final NoHurtcamHack noHurtcamHack = new NoHurtcamHack();
public final NoLevitationHack noLevitationHack = new NoLevitationHack();
public final NoOverlayHack noOverlayHack = new NoOverlayHack();
public final NoPortalOverlayHack noPortalOverlayHack =
new NoPortalOverlayHack();
public final NoPumpkinHack noPumpkinHack = new NoPumpkinHack();
public final NoShieldOverlayHack noShieldOverlayHack =
new NoShieldOverlayHack();
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/net/wurstclient/hacks/NoPortalOverlayHack.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2014-2024 Wurst-Imperium and contributors.
*
* This source code is subject to the terms of the GNU General Public
* License, version 3. If a copy of the GPL was not distributed with this
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
*/
package net.wurstclient.hacks;

import net.wurstclient.Category;
import net.wurstclient.SearchTags;
import net.wurstclient.hack.Hack;

@SearchTags({"no portal overlay"})
public final class NoPortalOverlayHack extends Hack
{
public NoPortalOverlayHack()
{
super("NoPortalOverlay");
setCategory(Category.RENDER);
}

// See IngameHudMixin.onRenderPortalOverlay()
}
12 changes: 12 additions & 0 deletions src/main/java/net/wurstclient/mixin/IngameHudMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@ private void onRenderOverlay(DrawContext context, Identifier texture,
if(WurstClient.INSTANCE.getHax().noPumpkinHack.isEnabled())
ci.cancel();
}

@Inject(at = @At("HEAD"),
method = "renderPortalOverlay(Lnet/minecraft/client/gui/DrawContext;F)V",
cancellable = true)
private void onRenderPortalOverlay(DrawContext context,
float nauseaStrength, CallbackInfo ci)
{
if(!WurstClient.INSTANCE.getHax().noPortalOverlayHack.isEnabled())
return;

ci.cancel();
}
}
1 change: 1 addition & 0 deletions src/main/resources/assets/wurst/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"description.wurst.hack.nohurtcam": "Disables the shaking effect when you get hurt.",
"description.wurst.hack.nolevitation": "Disables the levitation effect when you get hit by a Shulker.\n\n§c§lWARNING:§r You will fall if you activate this while the levitation effect is already active!",
"description.wurst.hack.nooverlay": "Blocks the overlays of water and lava.",
"description.wurst.hack.noportaloverlay": "Blocks the portal overlay when you stand in a portal.",
"description.wurst.hack.nopumpkin": "Blocks the overlay when wearing a pumpkin on your head.",
"description.wurst.hack.noshieldoverlay": "Lowers the shield so it covers less of your screen.",
"description.wurst.hack.noslowdown": "Cancels slowness effects caused by honey, soul sand and using items.",
Expand Down