Package net.minecraft.recipebook
Part 1/1
PlaceRecipeHelper
- Full name:
net.minecraft.recipebook.PlaceRecipeHelper - Package:
net.minecraft.recipebook - Source:
common—net/minecraft/recipebook/PlaceRecipeHelper.java - Type:
interface - Modifiers:
public
net.minecraft.recipebook.PlaceRecipeHelper#placeRecipe(int,int,int,int,Iterable<T>,PlaceRecipeHelper.Output<T>)
- Origin:
common - Source:
net/minecraft/recipebook/PlaceRecipeHelper.java:17 - Modifiers:
static - Return:
void
คืออะไร
ดำเนินการ placeRecipe ตาม implementation ของ PlaceRecipeHelper
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: iterator(), floor(), hasNext(), addItemToSlot(), next().
Parameters
int iint jint kint lIterable<T> iterablePlaceRecipeHelper.Output<T> output
ตัวอย่างใช้งาน
Iterable<T> iterable = ...;
PlaceRecipeHelper.Output<T> output = ...;
PlaceRecipeHelper.placeRecipe(0, 0, 0, 0, iterable, output);
net.minecraft.recipebook.PlaceRecipeHelper#placeRecipe(int,int,Recipe<?>,Iterable<T>,PlaceRecipeHelper.Output<T>)
- Origin:
common - Source:
net/minecraft/recipebook/PlaceRecipeHelper.java:9 - Modifiers:
static - Return:
void
คืออะไร
ดำเนินการ placeRecipe ตาม implementation ของ PlaceRecipeHelper
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getWidth(), getHeight().
Parameters
int iint jRecipe<?> recipeIterable<T> iterablePlaceRecipeHelper.Output<T> output
ตัวอย่างใช้งาน
Recipe<?> recipe = ...;
Iterable<T> iterable = ...;
PlaceRecipeHelper.Output<T> output = ...;
PlaceRecipeHelper.placeRecipe(0, 0, recipe, iterable, output);
ServerPlaceRecipe
- Full name:
net.minecraft.recipebook.ServerPlaceRecipe - Package:
net.minecraft.recipebook - Source:
common—net/minecraft/recipebook/ServerPlaceRecipe.java - Type:
class - Modifiers:
public
net.minecraft.recipebook.ServerPlaceRecipe#placeRecipe(ServerPlaceRecipe.CraftingMenuAccess<R>,int,int,List<Slot>,List<Slot>,Inventory,RecipeHolder<R>,boolean,boolean)
- Origin:
common - Source:
net/minecraft/recipebook/ServerPlaceRecipe.java:27 - Modifiers:
public static - Return:
RecipeBookMenu.PostPlaceAction
คืออะไร
ดำเนินการ placeRecipe ตาม implementation ของ ServerPlaceRecipe
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: testClearGrid(), fillStackedContents(), fillCraftSlotsStackedContents(), tryPlaceRecipe(). สร้างออบเจ็กต์: ServerPlaceRecipe<>, StackedItemContents. มีจุด return อย่างน้อย 2 จุด.
Parameters
ServerPlaceRecipe.CraftingMenuAccess<R> craftingMenuAccessint iint jList<Slot> listList<Slot> list2Inventory inventoryRecipeHolder<R> recipeHolderboolean blboolean bl2
ตัวอย่างใช้งาน
ServerPlaceRecipe.CraftingMenuAccess<R> craftingMenuAccess = ...;
List<Slot> list = ...;
List<Slot> list2 = ...;
Inventory inventory = ...;
RecipeHolder<R> recipeHolder = ...;
RecipeBookMenu.PostPlaceAction result = ServerPlaceRecipe.placeRecipe(craftingMenuAccess, 0, 0, list, list2, inventory, recipeHolder, true, true);
ServerPlaceRecipe$CraftingMenuAccess
- Full name:
net.minecraft.recipebook.ServerPlaceRecipe$CraftingMenuAccess - Package:
net.minecraft.recipebook - Source:
common—net/minecraft/recipebook/ServerPlaceRecipe.java - Type:
interface - Modifiers:
public
net.minecraft.recipebook.ServerPlaceRecipe$CraftingMenuAccess#clearCraftingContent()
- Origin:
common - Source:
net/minecraft/recipebook/ServerPlaceRecipe.java:234 - Modifiers: ``
- Return:
void
คืออะไร
ล้าง Crafting Content
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.recipebook.ServerPlaceRecipe$CraftingMenuAccess#fillCraftSlotsStackedContents(StackedItemContents)
- Origin:
common - Source:
net/minecraft/recipebook/ServerPlaceRecipe.java:232 - Modifiers: ``
- Return:
void
คืออะไร
ดำเนินการ fillCraftSlotsStackedContents ตาม implementation ของ ServerPlaceRecipe$CraftingMenuAccess
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
StackedItemContents stackedItemContents
ตัวอย่างใช้งาน
ServerPlaceRecipe.CraftingMenuAccess instance = ...;
StackedItemContents stackedItemContents = ...;
instance.fillCraftSlotsStackedContents(stackedItemContents);
net.minecraft.recipebook.ServerPlaceRecipe$CraftingMenuAccess#recipeMatches(RecipeHolder<T>)
- Origin:
common - Source:
net/minecraft/recipebook/ServerPlaceRecipe.java:236 - Modifiers: ``
- Return:
boolean
คืออะไร
ดำเนินการ recipeMatches ตาม implementation ของ ServerPlaceRecipe$CraftingMenuAccess
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
RecipeHolder<T> recipeHolder
ตัวอย่างใช้งาน
ServerPlaceRecipe.CraftingMenuAccess instance = ...;
RecipeHolder<T> recipeHolder = ...;
boolean result = instance.recipeMatches(recipeHolder);