added new method that gives a fresh SurfaceHelper for building 2D renders
package com.matt.forgehax.events;
+import com.matt.forgehax.util.draw.SurfaceHelper;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraftforge.fml.common.eventhandler.Event;
@@ -10,6 +11,7 @@ import static com.matt.forgehax.Globals.MC;
*/
public class Render2DEvent extends Event {
private final ScaledResolution resolution = new ScaledResolution(MC);
+ private final SurfaceHelper surfaceBuilder = new SurfaceHelper();
private final float partialTicks;
public Render2DEvent(float partialTicks) {
@@ -27,4 +29,8 @@ public class Render2DEvent extends Event {
public double getScreenHeight() {
return resolution.getScaledHeight_double();
}
+
+ public SurfaceHelper getSurfaceBuilder() {
+ return surfaceBuilder;
+ }
}
