2025-11-24 22:52:51 +03:00

34 lines
975 B
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.world;
import net.minecraft.network.chat.Component;
import net.minecraft.world.MenuProvider;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.inventory.MenuConstructor;
public final class SimpleMenuProvider
implements MenuProvider {
private final Component title;
private final MenuConstructor menuConstructor;
public SimpleMenuProvider(MenuConstructor menuConstructor, Component title) {
this.menuConstructor = menuConstructor;
this.title = title;
}
@Override
public Component getDisplayName() {
return this.title;
}
@Override
public AbstractContainerMenu createMenu(int containerId, Inventory inventory, Player player) {
return this.menuConstructor.createMenu(containerId, inventory, player);
}
}