Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Update document about BlockEntry #35

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion world/blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ instance.setBlock(0, 41, 0, tnt);

## Registry

Each block has unique data which can be retrieved with `Block#registry()`.
Each block is associated with a `BlockEntry`,which store some **unmodifiable **(not immutable) data generated by **vanilla**.

For example, `BlockEntry#explosionResistance()` return the explosion resistance in vanilla,and it's unmodifiable.However,it is just a value and will not really affect the explosion.

`BlockEntry` is unmodifiable for now, though we plan to make it modifiable in the future.

`BlockEntry` can be retrieved with `Block#registry()`.

```java
Block block = Block.GRASS;
Expand Down