public class ServerRecipePlacer<C extends IInventory> extends java.lang.Object implements IRecipePlacer<java.lang.Integer>
Modifier and Type | Field and Description |
---|---|
protected static org.apache.logging.log4j.Logger |
LOGGER |
protected PlayerInventory |
playerInventory |
protected RecipeBookContainer<C> |
recipeBookContainer |
protected RecipeItemHelper |
recipeItemHelper |
Constructor and Description |
---|
ServerRecipePlacer(RecipeBookContainer<C> p_i50752_1_) |
Modifier and Type | Method and Description |
---|---|
protected void |
clear() |
protected void |
consumeIngredient(Slot slotToFill,
ItemStack ingredientIn) |
private int |
getEmptyPlayerSlots() |
protected int |
getMaxAmount(boolean placeAll,
int maxPossible,
boolean recipeMatches) |
protected void |
giveToPlayer(int slotIn) |
void |
place(ServerPlayerEntity player,
IRecipe<C> recipe,
boolean placeAll) |
private boolean |
placeIntoInventory() |
void |
setSlotContents(java.util.Iterator<java.lang.Integer> ingredients,
int slotIn,
int maxAmount,
int y,
int x) |
protected void |
tryPlaceRecipe(IRecipe<C> recipe,
boolean placeAll) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
placeRecipe
protected static final org.apache.logging.log4j.Logger LOGGER
protected final RecipeItemHelper recipeItemHelper
protected PlayerInventory playerInventory
protected RecipeBookContainer<C extends IInventory> recipeBookContainer
public ServerRecipePlacer(RecipeBookContainer<C> p_i50752_1_)
public void place(ServerPlayerEntity player, @Nullable IRecipe<C> recipe, boolean placeAll)
protected void clear()
protected void giveToPlayer(int slotIn)
public void setSlotContents(java.util.Iterator<java.lang.Integer> ingredients, int slotIn, int maxAmount, int y, int x)
setSlotContents
in interface IRecipePlacer<java.lang.Integer>
protected int getMaxAmount(boolean placeAll, int maxPossible, boolean recipeMatches)
private boolean placeIntoInventory()
private int getEmptyPlayerSlots()