minecraft-src/net/minecraft/world/level/block/entity/SmokerBlockEntity.java
2025-07-04 02:49:36 +03:00

31 lines
1 KiB
Java

package net.minecraft.world.level.block.entity;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.inventory.SmokerMenu;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.RecipeType;
import net.minecraft.world.level.block.state.BlockState;
public class SmokerBlockEntity extends AbstractFurnaceBlockEntity {
public SmokerBlockEntity(BlockPos pos, BlockState blockState) {
super(BlockEntityType.SMOKER, pos, blockState, RecipeType.SMOKING);
}
@Override
protected Component getDefaultName() {
return Component.translatable("container.smoker");
}
@Override
protected int getBurnDuration(FuelValues fuelValues, ItemStack stack) {
return super.getBurnDuration(fuelValues, stack) / 2;
}
@Override
protected AbstractContainerMenu createMenu(int containerId, Inventory inventory) {
return new SmokerMenu(containerId, inventory, this, this.dataAccess);
}
}