blob: 4134ad5103857fa7efa1d03e2fa9c7eaa144165f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
package me.shedaniel.rei.gui.widget;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.Drawable;
import net.minecraft.client.render.GuiLighting;
import net.minecraft.util.Identifier;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
public class RecipeBaseWidget extends Drawable implements IWidget {
private static final Identifier CHEST_GUI_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png");
private Rectangle bounds;
public RecipeBaseWidget(Rectangle bounds) {
this.bounds = bounds;
}
@Override
public List<IWidget> getListeners() {
return new ArrayList<>();
}
@Override
public void draw(int mouseX, int mouseY, float partialTicks) {
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
GuiLighting.disable();
MinecraftClient.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE);
drawTexturedRect(bounds.x, bounds.y, 106, 190, bounds.width, bounds.height);
}
}
|