mirror of
https://github.com/Wurst-Imperium/Wurst7.git
synced 2024-09-20 01:12:13 +02:00
Clean up
This commit is contained in:
parent
c623f7b801
commit
b3178e2378
@ -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()
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user