Skip to content

Commit

Permalink
Fix MinecraftForge#5768 add access to MainWindow object in RenderGame…
Browse files Browse the repository at this point in the history
…OverlayEvent
  • Loading branch information
tterrag1098 committed Jun 22, 2019
1 parent 19059b0 commit 656ff25
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public float getPartialTicks()
{
return partialTicks;
}

public MainWindow getWindow()
{
return window;
}

public ElementType getType()
{
Expand Down Expand Up @@ -66,17 +71,20 @@ public static enum ElementType
}

private final float partialTicks;
private final MainWindow window;
private final ElementType type;

public RenderGameOverlayEvent(float partialTicks, MainWindow resolution)
public RenderGameOverlayEvent(float partialTicks, MainWindow window)
{
this.partialTicks = partialTicks;
this.window = window;
this.type = null;
}

private RenderGameOverlayEvent(RenderGameOverlayEvent parent, ElementType type)
{
this.partialTicks = parent.getPartialTicks();
this.window = parent.getWindow();
this.type = type;
}

Expand Down

0 comments on commit 656ff25

Please sign in to comment.