End Stone Smelter
This commit is contained in:
parent
257307d93d
commit
a542aac45b
18 changed files with 551 additions and 77 deletions
|
@ -0,0 +1,25 @@
|
|||
package ru.betterend.client.gui.slot;
|
||||
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.screen.slot.FurnaceFuelSlot;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import ru.betterend.client.gui.EndStoneSmelterScreenHandler;
|
||||
|
||||
public class SmelterFuelSlot extends Slot {
|
||||
|
||||
private final EndStoneSmelterScreenHandler handler;
|
||||
|
||||
public SmelterFuelSlot(EndStoneSmelterScreenHandler handler, Inventory inventory, int index, int x, int y) {
|
||||
super(inventory, index, x, y);
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
public boolean canInsert(ItemStack stack) {
|
||||
return this.handler.isFuel(stack) || FurnaceFuelSlot.isBucket(stack);
|
||||
}
|
||||
|
||||
public int getMaxItemCount(ItemStack stack) {
|
||||
return FurnaceFuelSlot.isBucket(stack) ? 1 : super.getMaxItemCount(stack);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue