0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-20 01:12:13 +02:00
This commit is contained in:
Alexander01998 2023-02-16 18:21:45 +01:00
parent c623f7b801
commit b3178e2378
2 changed files with 8 additions and 7 deletions

View File

@ -19,7 +19,7 @@ import net.wurstclient.settings.CheckboxSetting;
public final class NoBackgroundHack extends Hack
{
public final CheckboxSetting allGuis = new CheckboxSetting("All GUIs",
"Removes the background for all GUIs", false);
"Removes the background for all GUIs, not just inventories.", false);
public NoBackgroundHack()
{
@ -33,13 +33,13 @@ public final class NoBackgroundHack extends Hack
if(!isEnabled())
return false;
if(screen instanceof HandledScreen)
return true;
if(MC.world == null)
return false;
if(allGuis.isChecked() && MC.world != null)
return true;
if(!allGuis.isChecked() && !(screen instanceof HandledScreen))
return false;
return false;
return true;
}
// See ScreenMixin.onRenderBackground()

View File

@ -37,7 +37,8 @@ public abstract class ScreenMixin extends AbstractParentElement
cancellable = true)
public void onRenderBackground(MatrixStack matrices, CallbackInfo ci)
{
if(WurstClient.INSTANCE.getHax().noBackgroundHack.shouldCancelBackground((Screen)(Object)this))
if(WurstClient.INSTANCE.getHax().noBackgroundHack
.shouldCancelBackground((Screen)(Object)this))
ci.cancel();
}