Added a method that allows you to use a mask during rendering. example:
MaskRenderUtil.render(
new ResourceLocation("yourmod", "textures/gui/main.png"),
new ResourceLocation("yourmod", "textures/gui/mask.png"),
0, 0, 0,
200,200
);
main texture:

mask texture:

render:
