minor fix
This commit is contained in:
@@ -2,6 +2,7 @@ package dev.xkmc.l2core.base.menu.base;
|
||||
|
||||
import dev.xkmc.l2serial.util.Wrappers;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.Container;
|
||||
import net.minecraft.world.SimpleContainer;
|
||||
@@ -127,6 +128,10 @@ public class BaseContainerMenu<T extends BaseContainerMenu<T>> extends AbstractC
|
||||
return sprite.get(access);
|
||||
}
|
||||
|
||||
ResourceLocation getLayoutId() {
|
||||
return sprite.id();
|
||||
}
|
||||
|
||||
/**
|
||||
* Binds player inventory. Should not be called by others, but permits override.
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,10 @@ public abstract class BaseContainerScreen<T extends BaseContainerMenu<T>> extend
|
||||
renderTooltip(g, mx, my);
|
||||
}
|
||||
|
||||
protected MenuLayoutConfig.ScreenRenderer getRenderer() {
|
||||
return menu.getLayout().getRenderer(menu.getLayoutId(), this);
|
||||
}
|
||||
|
||||
protected boolean click(int btn) {
|
||||
if (menu.clickMenuButton(menu.player, btn) && Minecraft.getInstance().gameMode != null) {
|
||||
Minecraft.getInstance().gameMode.handleInventoryButtonClick(this.menu.containerId, btn);
|
||||
|
||||
@@ -207,7 +207,6 @@ public record MenuLayoutConfig(int height, HashMap<String, Rect> side, HashMap<S
|
||||
* bind texture, draw background color, and GUI background
|
||||
*/
|
||||
public void start(GuiGraphics g) {
|
||||
scr.renderTransparentBackground(g);
|
||||
g.blit(getTexture(id), x, y, 0, 0, w, h);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user