mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-23 09:57:39 +00:00
remap
This commit is contained in:
@@ -9,41 +9,38 @@ package dan200.computercraft.client.gui;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import dan200.computercraft.ComputerCraft;
|
||||
import dan200.computercraft.shared.peripheral.diskdrive.ContainerDiskDrive;
|
||||
|
||||
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class GuiDiskDrive extends HandledScreen<ContainerDiskDrive>
|
||||
{
|
||||
private static final Identifier BACKGROUND = new Identifier( "computercraft", "textures/gui/disk_drive.png" );
|
||||
public class GuiDiskDrive extends HandledScreen<ContainerDiskDrive> {
|
||||
private static final Identifier BACKGROUND = new Identifier("computercraft", "textures/gui/disk_drive.png");
|
||||
|
||||
public GuiDiskDrive( ContainerDiskDrive container, PlayerInventory inventory )
|
||||
{
|
||||
super( container, inventory, ComputerCraft.Blocks.diskDrive.getName() );
|
||||
public GuiDiskDrive(ContainerDiskDrive container, PlayerInventory inventory) {
|
||||
super(container, inventory, ComputerCraft.Blocks.diskDrive.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawForeground( int par1, int par2 )
|
||||
{
|
||||
String title = getTitle().asFormattedString();
|
||||
font.draw( title, (backgroundWidth - font.getWidth( title )) / 2.0f, 6, 0x404040 );
|
||||
font.draw( I18n.translate( "container.inventory" ), 8, (backgroundHeight - 96) + 2, 0x404040 );
|
||||
protected void drawForeground(int par1, int par2) {
|
||||
String title = this.getTitle().asFormattedString();
|
||||
font.draw(title, (this.backgroundWidth - font.getWidth(title)) / 2.0f, 6, 0x404040);
|
||||
font.draw(I18n.translate("container.inventory"), 8, (this.backgroundHeight - 96) + 2, 0x404040);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawBackground( float partialTicks, int mouseX, int mouseY )
|
||||
{
|
||||
GlStateManager.color4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
minecraft.getTextureManager().bindTextureInner( BACKGROUND );
|
||||
blit( x, y, 0, 0, backgroundWidth, backgroundHeight );
|
||||
protected void drawBackground(float partialTicks, int mouseX, int mouseY) {
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
minecraft.getTextureManager()
|
||||
.bindTextureInner(BACKGROUND);
|
||||
blit(this.x, this.y, 0, 0, this.backgroundWidth, this.backgroundHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render( int mouseX, int mouseY, float partialTicks )
|
||||
{
|
||||
public void render(int mouseX, int mouseY, float partialTicks) {
|
||||
renderBackground();
|
||||
super.render( mouseX, mouseY, partialTicks );
|
||||
drawMouseoverTooltip( mouseX, mouseY );
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
this.drawMouseoverTooltip(mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user