This commit is contained in:
corkscrew 2024-04-16 02:56:15 +03:00
parent ccca7f55dd
commit 08af1ac255
3 changed files with 4 additions and 9 deletions

View File

@ -30,7 +30,7 @@ import java.util.Set;
@Environment(EnvType.CLIENT)
public abstract class CustomHandledScreen<T extends ScreenHandler> extends Screen implements ScreenHandlerProvider<T> {
public static final Identifier BACKGROUND_TEXTURE = new Identifier("textures/gui/container/inventory.png");
public static final Identifier BACKGROUND_TEXTURE = new Identifier("testing:textures/inventory.png");
private static final float field_32318 = 100.0F;
private static final int field_32319 = 500;
public static final int field_32322 = 100;

View File

@ -38,7 +38,6 @@ public class CustomInventoryScreen extends CustomAbstractInventoryScreen<PlayerS
this.client.setScreen(new CreativeInventoryScreen(this.client.player, this.client.player.networkHandler.getEnabledFeatures(), (Boolean)this.client.options.getOperatorItemsTab().getValue()));
} else {
super.init();
this.narrow = this.width < 379;
}
}
@ -48,11 +47,7 @@ public class CustomInventoryScreen extends CustomAbstractInventoryScreen<PlayerS
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
this.renderBackground(context);
if (this.narrow) {
this.drawBackground(context, delta, mouseX, mouseY);
} else {
super.render(context, mouseX, mouseY, delta);
}
super.render(context, mouseX, mouseY, delta);
this.drawMouseoverTooltip(context, mouseX, mouseY);
this.mouseX = (float)mouseX;
@ -113,11 +108,11 @@ public class CustomInventoryScreen extends CustomAbstractInventoryScreen<PlayerS
}
protected boolean isPointWithinBounds(int x, int y, int width, int height, double pointX, double pointY) {
return (!this.narrow) && super.isPointWithinBounds(x, y, width, height, pointX, pointY);
return super.isPointWithinBounds(x, y, width, height, pointX, pointY);
}
public boolean mouseClicked(double mouseX, double mouseY, int button) {
return this.narrow ? false : super.mouseClicked(mouseX, mouseY, button);
return super.mouseClicked(mouseX, mouseY, button);
}
public boolean mouseReleased(double mouseX, double mouseY, int button) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB