56 lines
2.3 KiB
Java
56 lines
2.3 KiB
Java
package com.dairymoose.modernlife.blocks.gui;
|
|
|
|
import com.dairymoose.inventory.container.TrashCanContainer;
|
|
import com.mojang.blaze3d.systems.RenderSystem;
|
|
import com.mojang.blaze3d.vertex.PoseStack;
|
|
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
|
|
import net.minecraft.client.renderer.GameRenderer;
|
|
import net.minecraft.network.chat.Component;
|
|
import net.minecraft.network.chat.TextComponent;
|
|
import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraft.world.entity.player.Inventory;
|
|
import net.minecraftforge.api.distmarker.Dist;
|
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
import org.apache.logging.log4j.LogManager;
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
@OnlyIn(Dist.CLIENT)
|
|
/* loaded from: outputsrg.jar:com/dairymoose/modernlife/blocks/gui/SeedSpreaderScreen.class */
|
|
public class SeedSpreaderScreen extends AbstractContainerScreen<TrashCanContainer> {
|
|
private static final Logger LOGGER = LogManager.getLogger();
|
|
private static final ResourceLocation TRASH_CAN_GUI = new ResourceLocation("modernlife", "textures/gui/gui_seed_spreader.png");
|
|
static final int GUI_WIDTH = 256;
|
|
static final int GUI_HEIGHT = 206;
|
|
Inventory inventory;
|
|
|
|
public SeedSpreaderScreen(TrashCanContainer trashCanContainer, Inventory inventory, Component title) {
|
|
super(trashCanContainer, inventory, title == null ? new TextComponent("Container") : title);
|
|
this.inventoryLabelX = 31;
|
|
this.inventoryLabelY = 103;
|
|
this.imageWidth = GUI_WIDTH;
|
|
this.imageHeight = GUI_HEIGHT;
|
|
}
|
|
|
|
protected void init() {
|
|
super.init();
|
|
}
|
|
|
|
public boolean isPauseScreen() {
|
|
return false;
|
|
}
|
|
|
|
public void render(PoseStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_) {
|
|
super.render(p_230430_1_, p_230430_2_, p_230430_3_, p_230430_4_);
|
|
super.renderTooltip(p_230430_1_, p_230430_2_, p_230430_3_);
|
|
}
|
|
|
|
protected void renderBg(PoseStack var1, float var2, int var3, int var4) {
|
|
m_7333_(var1);
|
|
RenderSystem.setShader(GameRenderer::getPositionTexShader);
|
|
RenderSystem.setShaderTexture(0, TRASH_CAN_GUI);
|
|
int lvt_5_1_ = (this.f_96543_ - GUI_WIDTH) / 2;
|
|
int lvt_6_1_ = (this.f_96544_ - GUI_HEIGHT) / 2;
|
|
m_93228_(var1, lvt_5_1_, lvt_6_1_, 0, 0, GUI_WIDTH, GUI_HEIGHT);
|
|
}
|
|
}
|