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

36 lines
990 B
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.world.inventory;
import net.minecraft.world.Container;
import net.minecraft.world.inventory.AbstractFurnaceMenu;
import net.minecraft.world.inventory.Slot;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
public class FurnaceFuelSlot
extends Slot {
private final AbstractFurnaceMenu menu;
public FurnaceFuelSlot(AbstractFurnaceMenu menu, Container container, int slot, int x, int y) {
super(container, slot, x, y);
this.menu = menu;
}
@Override
public boolean mayPlace(ItemStack itemStack) {
return this.menu.isFuel(itemStack) || FurnaceFuelSlot.isBucket(itemStack);
}
@Override
public int getMaxStackSize(ItemStack itemStack) {
return FurnaceFuelSlot.isBucket(itemStack) ? 1 : super.getMaxStackSize(itemStack);
}
public static boolean isBucket(ItemStack itemStack) {
return itemStack.is(Items.BUCKET);
}
}