cCraftingGrid


Index:
Articles
Classes
Hooks

Quick navigation:
BannerPattern
BossBarColor
BossBarDivisionType
cArrowEntity
cBeaconEntity
cBedEntity
cBlockArea
cBlockEntity
cBlockEntityWithItems
cBlockInfo
cBoat
cBoundingBox
cBrewingstandEntity
cChatColor
cChestEntity
cChunkDesc
cClientHandle
cColor
cCommandBlockEntity
cCompositeChat
cCraftingGrid
cCraftingRecipe
cCryptoHash
cCuboid
cDispenserEntity
cDropperEntity
cDropSpenserEntity
cEnchantments
cEnderCrystal
cEntity
cEntityEffect
cExpBottleEntity
cExpOrb
cFallingBlock
cFile
cFireChargeEntity
cFireworkEntity
cFloater
cFlowerPotEntity
cFurnaceEntity
cGhastFireballEntity
cHangingEntity
cHopperEntity
cIniFile
cInventory
cItem
cItemFrame
cItemGrid
cItems
cJson
cJukeboxEntity
cLeashKnot
cLineBlockTracer
cLuaWindow
cMap
cMapManager
cMobHeadEntity
cMobSpawnerEntity
cMojangAPI
cMonster
cNetwork
cNoteEntity
cObjective
cPainting
cPawn
cPickup
cPlayer
cPlugin
cPluginLua
cPluginManager
cProjectileEntity
cRankManager
cRoot
cScoreboard
cServer
cServerHandle
cSignEntity
cSplashPotionEntity
cStringCompression
cTCPLink
cTeam
cThrownEggEntity
cThrownEnderPearlEntity
cThrownSnowballEntity
cTNTEntity
cUDPEndpoint
cUrlClient
cUrlParser
CustomStatistic
cUUID
cWebAdmin
cWindow
cWitherSkullEntity
cWorld
EffectID
HTTPFormData
HTTPRequest
HTTPTemplateRequest
ItemCategory
lxp
SmokeDirection
sqlite3
StatisticsManager
TakeDamageInfo
tolua
Vector3d
Vector3f
Vector3i
Globals

Contents


cCraftingGrid class

cCraftingGrid represents the player's crafting grid. It is used in OnCraftingNoRecipe, OnPostCrafting and OnPreCrafting hooks. Plugins may use it to inspect the items the player placed on their crafting grid.

Also, an object of this type is used in cCraftingRecipe's ConsumeIngredients() function for specifying the exact number of ingredients to consume in that recipe; plugins may use this to apply the crafting recipe.


Functions

NameParametersReturn valueNotes
() (constructor)
Widthnumber
Heightnumber
cCraftingGrid
Creates a new CraftingGrid object. This new crafting grid is not related to any player, but may be needed for cCraftingRecipe's ConsumeIngredients function.
Clear Clears the entire grid
ConsumeGrid
CraftingGridcCraftingGrid
Consumes items specified in CraftingGrid from the current contents. Used internally by cCraftingRecipe's ConsumeIngredients() function, but available to plugins, too.
Dump DEBUG build: Dumps the contents of the grid to the log. RELEASE build: no action
GetHeight
number
Returns the height of the grid
GetItem
xnumber
ynumber
cItem
Returns the item at the specified coords
GetWidth
number
Returns the width of the grid
SetItem
xnumber
ynumber
ItemTypenumber
ItemCountnumber
ItemDamagenumber
Sets the item at the specified coords
SetItem
xnumber
ynumber
cItemcItem
Sets the item at the specified coords
Generated by APIDump on 2024-12-18 00:46:06, Build ID 101, Commit b92dc1cda3576ffc4c85347b0e8449d5adb87ef6