Skip to content

Commit

Permalink
fix: docs formula
Browse files Browse the repository at this point in the history
  • Loading branch information
IWareQ committed Jun 16, 2024
1 parent 715b08b commit 52f6b1e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package org.allaymc.api.network;

import lombok.experimental.UtilityClass;
import org.allaymc.api.datastruct.SemVersion;
import org.cloudburstmc.protocol.bedrock.codec.BedrockCodec;
import org.cloudburstmc.protocol.bedrock.codec.v671.Bedrock_v671;

@UtilityClass
public final class ProtocolInfo {

public static final BedrockCodec PACKET_CODEC = Bedrock_v671.CODEC;

public static final SemVersion MINECRAFT_VERSION = new SemVersion(1, 20, 80, 3, 0);

public static final int BLOCK_STATE_VERSION_NO_REVISION = (MINECRAFT_VERSION.major() << 24) | //major
(MINECRAFT_VERSION.minor() << 16) | //minor
(MINECRAFT_VERSION.patch() << 8); //patch
public static final int BLOCK_STATE_VERSION_NO_REVISION = (MINECRAFT_VERSION.major() << 24) | // major
(MINECRAFT_VERSION.minor() << 16) | // minor
(MINECRAFT_VERSION.patch() << 8); // patch

public static final int BLOCK_STATE_VERSION = BLOCK_STATE_VERSION_NO_REVISION | MINECRAFT_VERSION.revision(); //revision

private ProtocolInfo() {}
public static final int BLOCK_STATE_VERSION = BLOCK_STATE_VERSION_NO_REVISION | MINECRAFT_VERSION.revision(); // revision
}
10 changes: 10 additions & 0 deletions docs/js/katex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
document$.subscribe(({body}) => {
renderMathInElement(body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false},
{left: "\\(", right: "\\)", display: false},
{left: "\\[", right: "\\]", display: true}
]
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ The `data` field in `LevelEventPacket(type=BLOCK_UPDATE_BREAK, position=(15.0, -
time required to mine.
The formula is

```math
$$
time = \frac{6553.5}{\text{required mining seconds}}
```
$$

The data field in `LevelEventPacket(type=PARTICLE_CRACK_BLOCK, position=(3.5, -60.5, -1.5), data=50342246)` indicates
the block's BlockStateHash.
Expand Down
10 changes: 10 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@ extra:
- icon: fontawesome/brands/github
link: https://github.com/AllayMC

markdown_extensions:
- pymdownx.arithmatex:
generic: true

extra_javascript:
- javascripts/katex.js
- https://unpkg.com/katex@0/dist/katex.min.js
- https://unpkg.com/katex@0/dist/contrib/auto-render.min.js

extra_css:
- stylesheets/extra.css
- https://unpkg.com/katex@0/dist/katex.min.css

plugins:
- search
Expand Down

0 comments on commit 52f6b1e

Please sign in to comment.