Skip to content

Commit

Permalink
Merge pull request #7 from ZXMushroom63/main
Browse files Browse the repository at this point in the history
Plugin Docs for Alpha 4.0
  • Loading branch information
OtterDev authored Sep 4, 2023
2 parents e3a9411 + 6d2f4aa commit bc2a4bc
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ module.exports = {
title: 'Globals',
collapsable: true,
children: [
'globals/Data',
'globals/AxisAlignedBB',
'globals/BlockData',
'globals/EnchantmentData',
Expand All @@ -100,6 +101,9 @@ module.exports = {
'globals/MapColor',
'globals/MaterialData',
'globals/PlayerData',
'globals/ItemStackData',
'globals/InventoryBasicData',
'globals/ContainerData',
'globals/Vec3',
'globals/require',
'globals/updateComponent',
Expand Down
1 change: 0 additions & 1 deletion src/plugindocs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ It has the following methods:




It also has some global objects which expose some of the inner Minecraft workings. Go [here](globals/ListOfGlobals.md) to view the full list.
8 changes: 8 additions & 0 deletions src/plugindocs/globals/ContainerData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ContainerData
Represents a container.

Has the following properties:
- `inventoryItemStacks : [ItemStackData](ItemStackData.md)[]`

And the following methods:
- `getPlayerList() : [PlayerData](PlayerData.md)[]`
3 changes: 3 additions & 0 deletions src/plugindocs/globals/Data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Data

Data is the parent of all other types of data, so all types of data share the `reload()` method. Reload is used to force reload the data in-game.
8 changes: 8 additions & 0 deletions src/plugindocs/globals/InventoryBasicData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# InventoryBasicData
Represents a basic inventory.

Has the following properties:
- `inventoryContents : [ItemStackData](ItemStackData.md)[]`
- `inventoryTitle : String`
- `slotsCount : Integer`
- `hasCustomName : Boolean`
44 changes: 44 additions & 0 deletions src/plugindocs/globals/ItemStackData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# ItemStackData
Represents an itemstack.

Has the following properties:
- `amount : Integer`
- `animationsToGo : Integer`
- `itemId : Integer`
- `itemDamage : Integer`
- `itemFrame : [EntityData](EntityData.md)` (If existing)
- `canDestroyCacheBlock : BlockData`
- `canDestroyCacheResult : Boolean`
- `canPlaceOnCacheBlock : BlockData`
- `canPlaceOnCacheResult : Boolean`

Has the following methods:
- `getItem() : [ItemData.md](ItemData.md)`
- `getMaxStackSize() : Integer`
- `isStackable() : Boolean`
- `isItemStackDamageable() : Boolean`
- `getHasSubtypes() : Boolean`
- `isItemDamaged() : Boolean`
- `getItemDamage() : Integer`
- `getMetadata() : Integer`
- `setItemDamage({meta: Integer}) : void`
- `getMaxDamage() : Integer`
- `copy() : [ItemStackData.md](ItemStackData.md)`
- `getUnlocalizedName() : String`
- `toString() : String`
- `getMaxItemUseDuration() : Integer`
- `getDisplayName() : String`
- `setDisplayName(displayName: String) : [ItemStackData.md](ItemStackData.md)`
- `clearCustomName() : void`
- `hasDisplayName() : Boolean`
- `hasEffect() : Boolean`
- `isItemEnchantable() : Boolean`
- `addEnchantment(enchId: Integer, level: Integer) : void`
- `isItemEnchanted() : Boolean`
- `canEditBlocks() : Boolean`
- `isOnItemFrame() : Boolean`
- `getRepairCost() : Integer`
- `setRepairCost(cost: Integer) : void`
- `setItem(itemId: Integer) : void`
- `canDestroy(blockId: Integer) : Boolean`
- `canPlaceOn(blockId: Integer) : Boolean`
2 changes: 1 addition & 1 deletion src/plugindocs/globals/MapColor.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Represents a map color.

Has the following properties:
- `colorIndex` : Integer
- `colorValue` : colorValue
- `colorValue` : Integer
- `rgb` : Integer[]
1 change: 1 addition & 0 deletions src/plugindocs/globals/PlayerData.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ All of the properties of [EntityData](EntityData.md), and:
- `flyToggleTimer`: Integer: Equal to the player's `flyToggleTimer`.
- `hasReducedDebug`: Boolean: Equal to the player's `hasReducedDebug`.
- `itemInUseCount`: Integer: The count of the item that the player is currenly using. (Read-only)
- `itemInUse`: [ItemStackData](ItemStackData.md): The itemstack the player is using. (If existing)
- `lastXPSound`: Integer: Equal to the player's `lastXPSound`.
- `sleepTimer`: Integer: Equal to the player's `sleepTimer`.
- `sleeping`: Boolean: Whether or not the player is sleeping.
Expand Down

0 comments on commit bc2a4bc

Please sign in to comment.