Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Nov 11, 2023
1 parent c7f8505 commit c8b1c95
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/net/wurstclient/mixin/DeathScreenMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@ private DeathScreenMixin(WurstClient wurst, Text title)
super(title);
}

@Inject(at = @At(value = "TAIL"), method = "tick()V")
@Inject(at = @At("TAIL"), method = "tick()V")
private void onTick(CallbackInfo ci)
{
EventManager.fire(DeathEvent.INSTANCE);
}

@Inject(at = @At("TAIL"), method = {"init()V"})
@Inject(at = @At("TAIL"), method = "init()V")
private void onInit(CallbackInfo ci)
{
if(!WurstClient.INSTANCE.isEnabled())
return;

addAutoRespawnButton();
}

private void addAutoRespawnButton()
{
int backButtonX = width / 2 - 100;
Expand All @@ -52,6 +53,7 @@ private void addAutoRespawnButton()
.builder(Text.literal("AutoRespawn"), b -> pressAutoRespawn())
.dimensions(backButtonX, backButtonY + 48, 200, 20).build());
}

private void pressAutoRespawn()
{
AutoRespawnHack autoRespawn =
Expand Down

0 comments on commit c8b1c95

Please sign in to comment.