All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.nukkit.inventory.CampfireInventory Maven / Gradle / Ivy

Go to download

A Minecraft Bedrock Edition server software implementation made in Java from scratch which supports all new features.

There is a newer version: 1.6.0.1-PN
Show newest version
package cn.nukkit.inventory;

import cn.nukkit.blockentity.BlockEntityCampfire;
import cn.nukkit.item.Item;

public class CampfireInventory extends ContainerInventory {

    public CampfireInventory(BlockEntityCampfire campfire) {
        super(campfire, InventoryType.CAMPFIRE);
    }

    public CampfireInventory(BlockEntityCampfire furnace, InventoryType inventoryType) {
        super(furnace, inventoryType);
    }

    @Override
    public BlockEntityCampfire getHolder() {
        return (BlockEntityCampfire) this.holder;
    }

    @Override
    public void onSlotChange(int index, Item before, boolean send) {
        super.onSlotChange(index, before, send);

        this.getHolder().scheduleUpdate();
        this.getHolder().spawnToAll();
    }

    @Override
    public int getMaxStackSize() {
        return 1;
    }

    @Override
    public boolean canAddItem(Item item) {
        return super.canAddItem(item);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy