Skip to content

Commit

Permalink
Merge pull request #905 from BedrockCommands/wiki
Browse files Browse the repository at this point in the history
Updated Useful Links, Style Guide, and Commands Pages
  • Loading branch information
QuazChick committed Sep 30, 2024
2 parents 23b7fa0 + 347bff1 commit 163d3f6
Show file tree
Hide file tree
Showing 27 changed files with 1,110 additions and 394 deletions.
155 changes: 84 additions & 71 deletions docs/commands/block-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,160 +30,173 @@ To preserve credits to the creator, the community termed this method as "Max's B
## Setup

*To be typed in chat:*
1. `/summon armor_stand Grumm`
1. `/summon armor_stand ~~~ 81 ~ default "Grumm"`
- We will set the Y (horizontal) rotation to `81` to align with the normal Minecraft block grid.
- It is necessary to name it 'Grumm' to avoid inverted block textures.
2. `/execute as @e [type= armor_stand, name=Grumm, c=1] at @s run tp @s ~~~ 260`
- This will match the MBE rotation to the normal Minecraft block grid.

:::tip
- Crouch & right-click (on mcpe: long press) the armor stand 6 times to place it in Pose 7
- Doing this negates the need to use the 2nd command in the system below.
- Crouch & right-click (on mcpe: long press) the armor stand 6 times to place it in 'Entertain' pose.
- Doing this negates the need to use the 1st command in the system below.
- **Only use this if you wish to reduce one command from the system.**
:::

3. Lastly, place the desired block item in the armor stand's main-hand.
2. Lastly, place the desired block item in the armor stand's main-hand.

:::tip
- `/replaceitem entity @e [name=Grumm] slot.weapon.offhand 0 <itemID>`
- Instead of manually placing the desired block item in the armor stand's main-hand, use this command to place it in it's offhand to prevent players from taking the item.
- Instead of manually placing the desired block item in the armor stand's main-hand, use this command to place it in it's off-hand to prevent players from taking the item.
:::

## System

> Note: Adding a delay of 100-200 ticks is recommended.
<CodeHeader>BP/functions/MBE/render.mcfunction</CodeHeader>
<CodeHeader>BP/functions/mbe/render.mcfunction</CodeHeader>

```yaml
effect @e [type= armor_stand, name=Grumm] invisibility 999999 1 true
playanimation @e [type= armor_stand, name=Grumm] animation.armor_stand.entertain_pose null 0 "0" align.arms
playanimation @e [type= armor_stand, name=Grumm] animation.player.move.arms.zombie null 0 "0" size.mini_block
playanimation @e [type= armor_stand, name=Grumm] animation.ghast.scale null 0 "0" size.full_block
playanimation @e [type= armor_stand, name=Grumm] animation.fireworks_rocket.move null 0 "0" align.full_block
execute as @e [type= armor_stand, name=Grumm] at @s run tp ~~~
## Align Arms
playanimation @e [type=armor_stand, name=Grumm] animation.armor_stand.entertain_pose null 0 "0" wiki:align.arms

## Mini Block Size
playanimation @e [type=armor_stand, name=Grumm] animation.player.move.arms.zombie null 0 "0" wiki:size.mini_block

## Full Block (optional)
### Size
playanimation @e [type=armor_stand, name=Grumm] animation.ghast.scale null 0 "0" wiki:size.full_block
### Align
playanimation @e [type=armor_stand, name=Grumm] animation.fireworks_rocket.move null 0 "0" wiki:align.full_block

## Freeze Armor Stand
execute as @e [type=armor_stand, name=Grumm] at @s run tp ~~~

## Hide Armor Stand Body
effect @e [type=armor_stand, name=Grumm] invisibility 999999 1 true
```
![commandBlockChain6](/assets/images/commands/commandBlockChain/6.png)

### Purpose Of Each Command
1. Hides the armor stand body.
2. Automatically sets the armor stand pose to 7 for arms alignment. Skip this command you prefer to do it manually.
3. __Required command__. Increases size to present as mini-block.
4. *Optional command.* Increases size to present as full-block.
5. *Optional command.* Aligns the full-block size MBE properly.
- Skip 4 & 5 if you do not need full-block size MBE.
6. Locks in place to prevent fall in case block beneath is removed.
1. Automatically sets the armor stand pose to 'Entertain' for arms alignment. Skip this command if you prefer to do it manually.
2. __Required command__. Increases size to present as mini-block.
3. *Optional command.* Increases size to present as full-block.
4. *Optional command.* Aligns the full-block size MBE properly.
- Skip 3 & 4 if you do not need full-block size MBE.
5. Locks the armor stand in place to prevent fall in case block beneath is removed.
6. Hides the armor stand body.

Note: Providing a controller name allows us to stack animations without overwriting the previous one. Example:
- `wiki:align.full_block` (where `wiki` is a namespace).

Using the same controller names above is not required. However, it can help avoid collisions with other playanimation commands.

## Rotations & Alignments

> Note: These rotation commands (when item placed in main-hand) are to be triggered once through a command block.
<Spoiler title="Full MBE">
<Spoiler title="Full Block">

<CodeHeader></CodeHeader>

```yaml
# Face North
tp @e [type=armor_stand, name=Grumm, c=1] ~-1.1245 ~0.2260 ~-0.097 81
# Face north
/tp @e [type=armor_stand, name=Grumm, c=1] ~-1.1245 ~0.2260 ~-0.097 81

# Face South
tp @e [type=armor_stand, name=Grumm, c=1] ~1.1245 ~0.2260 ~0.097 260
# Face south
/tp @e [type=armor_stand, name=Grumm, c=1] ~1.1245 ~0.2260 ~0.097 260

# Face East
tp @e [type=armor_stand, name=Grumm, c=1] ~0.097 ~0.2260 ~-1.1245 171
# Face east
/tp @e [type=armor_stand, name=Grumm, c=1] ~0.097 ~0.2260 ~-1.1245 171

# Face West
tp @e [type=armor_stand, name=Grumm, c=1] ~-0.097 ~0.2260 ~1.1245 350
# Face west
/tp @e [type=armor_stand, name=Grumm, c=1] ~-0.097 ~0.2260 ~1.1245 350
```

</Spoiler>


<Spoiler title="Mini MBE">
<Spoiler title="Mini Block">

<CodeHeader></CodeHeader>

```yaml
# Face North
tp @e [type=armor_stand, name=Grumm, c=1] ~-0.417~-0.5 ~-0.035 81
# Face north
/tp @e [type=armor_stand, name=Grumm, c=1] ~-0.417~-0.5 ~-0.035 81

# Face South
tp @e [type=armor_stand, name=Grumm, c=1] ~0.417 ~-0.5 ~0.035 260
# Face south
/tp @e [type=armor_stand, name=Grumm, c=1] ~0.417 ~-0.5 ~0.035 260

# Face East
tp @e [type=armor_stand, name=Grumm, c=1] ~0.035 ~-0.5 ~-0.417 171
# Face east
/tp @e [type=armor_stand, name=Grumm, c=1] ~0.035 ~-0.5 ~-0.417 171

# Face West
tp @e [type=armor_stand, name=Grumm, c=1] ~-0.035 ~-0.5 ~0.417 350
# Face west
/tp @e [type=armor_stand, name=Grumm, c=1] ~-0.035 ~-0.5 ~0.417 350
```

</Spoiler>

<Spoiler title="Stair MBE">
<Spoiler title="Stairs">

<CodeHeader></CodeHeader>

```yaml
# Face North
tp @e [type=armor_stand, name=Grumm, c=1] ~-0.097 ~0.2325 ~1.1245 350
# Face north
/tp @e [type=armor_stand, name=Grumm, c=1] ~-0.097 ~0.2325 ~1.1245 350

# Face South
tp @e [type=armor_stand, name=Grumm, c=1] ~0.097 ~0.2325 ~-1.1245 171
# Face south
/tp @e [type=armor_stand, name=Grumm, c=1] ~0.097 ~0.2325 ~-1.1245 171

# Face East
tp @e [type=armor_stand, name=Grumm, c=1] ~-1.1245 ~0.2325 ~-0.097 81
# Face east
/tp @e [type=armor_stand, name=Grumm, c=1] ~-1.1245 ~0.2325 ~-0.097 81

# Face West
tp @e [type=armor_stand, name=Grumm, c=1] ~1.1245 ~0.2325 ~0.097 260
# Face west
/tp @e [type=armor_stand, name=Grumm, c=1] ~1.1245 ~0.2325 ~0.097 260
```

</Spoiler>

<Spoiler title="Bottom Slab MBE">
<Spoiler title="Bottom Slab">

<CodeHeader></CodeHeader>

```yaml
# Face North
tp @e [type=armor_stand, name=Grumm, c=1] ~-0.097 ~0.2325 ~1.1245 350
# Face north
/tp @e [type=armor_stand, name=Grumm, c=1] ~-0.097 ~0.2325 ~1.1245 350

# Face South
tp @e [type=armor_stand, name=Grumm, c=1] ~0.097 ~0.2325 ~-1.1245 171
# Face south
/tp @e [type=armor_stand, name=Grumm, c=1] ~0.097 ~0.2325 ~-1.1245 171

# Face East
tp @e [type=armor_stand, name=Grumm, c=1] ~-1.1245 ~0.2325 ~-0.097 81
# Face east
/tp @e [type=armor_stand, name=Grumm, c=1] ~-1.1245 ~0.2325 ~-0.097 81

# Face West
tp @e [type=armor_stand, name=Grumm, c=1] ~1.1245 ~0.2325 ~0.097 260
# Face west
/tp @e [type=armor_stand, name=Grumm, c=1] ~1.1245 ~0.2325 ~0.097 260
```

</Spoiler>

<Spoiler title="Top Slab MBE">
<Spoiler title="Top Slab">

<CodeHeader></CodeHeader>

```yaml
# Face North
tp @e [type=armor_stand, name=Grumm, c=1] ~-1.1245 ~0.484 ~-0.097 81
# Face north
/tp @e [type=armor_stand, name=Grumm, c=1] ~-1.1245 ~0.484 ~-0.097 81

# Face South
tp @e [type=armor_stand, name=Grumm, c=1] ~1.1245 ~0.484 ~0.097 260
# Face south
/tp @e [type=armor_stand, name=Grumm, c=1] ~1.1245 ~0.484 ~0.097 260

# Face East
tp @e [type=armor_stand, name=Grumm, c=1] ~0.097 ~0.484 ~-1.1245 171
# Face east
/tp @e [type=armor_stand, name=Grumm, c=1] ~0.097 ~0.484 ~-1.1245 171

# Face West
tp @e [type=armor_stand, name=Grumm, c=1] ~-0.097 ~0.484 ~1.1245 350
# Face west
/tp @e [type=armor_stand, name=Grumm, c=1] ~-0.097 ~0.484 ~1.1245 350
```

</Spoiler>

## Saving & Loading MBE

1. To save, run:
- `/execute as @e [type=armor_stand, name=Grumm, c=1] at @s run structure save MBE ~~~ ~~~`
- `/execute at @e [type=armor_stand, name=Grumm, c=1] run structure save wiki ~~~ ~~~ true disk false`

2. To load, run:
- `/structure load MBE <coordinates>`
- `/structure load wiki <to: x y z>`

> Note: Structure name `MBE` can be changed to your preference.
> Note: Structure name `wiki` can be changed to your preference.
10 changes: 5 additions & 5 deletions docs/commands/block-states.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ This is used in a multitude of commands. Such as `/clone`, `/execute`, `/fill`,

In Bedrock Edition, we used Aux values (also known as Metadata) to define a block. However, as of 1.19.70 and beyond, this is no longer supported and have been fully replaced with Block States instead.

<CodeHeader>example</CodeHeader>
<CodeHeader></CodeHeader>

```yaml
#Aux Value Example:
# Aux Value example:
/setblock ~ ~ ~ wool 1
#It's Block State equivalent:
# It's Block State equivalent:
/setblock ~ ~ ~ wool ["color"="orange"]
```

Expand Down Expand Up @@ -87,10 +87,10 @@ For example, the following commands will work:
<CodeHeader></CodeHeader>

```yaml
#Testing for a Stone Button. (aux value 0)
# Testing for a Stone Button (Aux Value 0)
/execute if block ~~~ stone_button run say success

#Testing for a non-pressed Stone Button facing west. (aux value 1)
# Testing for a non-pressed Stone Button facing west (Aux Value 1)
/execute if block ~~~ stone_button [“button_pressed_bit”=false,”facing_direction”=1] run say success
```

Expand Down
Loading

0 comments on commit 163d3f6

Please sign in to comment.