1.16 port
This commit is contained in:
@@ -18,12 +18,15 @@
|
||||
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import net.minecraft.client.gui.widget.TextFieldWidget;
|
||||
import net.minecraft.client.util.InputMappings;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.ActionKey;
|
||||
@@ -47,7 +50,8 @@ public class QuartzKnifeScreen extends AEBaseScreen<QuartzKnifeContainer> {
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.name = new TextFieldWidget(this.font, this.guiLeft + 24, this.guiTop + 32, 79, this.font.FONT_HEIGHT, "");
|
||||
this.name = new TextFieldWidget(this.font, this.guiLeft + 24, this.guiTop + 32, 79, this.font.FONT_HEIGHT,
|
||||
new StringTextComponent(""));
|
||||
this.name.setEnableBackgroundDrawing(false);
|
||||
this.name.setMaxStringLength(32);
|
||||
this.name.setTextColor(0xFFFFFF);
|
||||
@@ -56,16 +60,19 @@ public class QuartzKnifeScreen extends AEBaseScreen<QuartzKnifeContainer> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(final int offsetX, final int offsetY, final int mouseX, final int mouseY) {
|
||||
this.font.drawString(this.getGuiDisplayName(GuiText.QuartzCuttingKnife.getLocal()), 8, 6, 4210752);
|
||||
this.font.drawString(GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752);
|
||||
public void drawFG(MatrixStack matrixStack, final int offsetX, final int offsetY, final int mouseX,
|
||||
final int mouseY) {
|
||||
this.font.drawString(matrixStack,
|
||||
this.getGuiDisplayName(GuiText.QuartzCuttingKnife.textComponent()).getString(), 8, 6, 4210752);
|
||||
this.font.drawString(matrixStack, GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(final int offsetX, final int offsetY, final int mouseX, final int mouseY, float partialTicks) {
|
||||
public void drawBG(MatrixStack matrixStack, final int offsetX, final int offsetY, final int mouseX,
|
||||
final int mouseY, float partialTicks) {
|
||||
this.bindTexture("guis/quartzknife.png");
|
||||
GuiUtils.drawTexturedModalRect(offsetX, offsetY, 0, 0, this.xSize, this.ySize, getBlitOffset());
|
||||
this.name.render(mouseX, mouseY, partialTicks);
|
||||
this.name.render(matrixStack, mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user