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 1 commit
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
10 changes: 8 additions & 2 deletions world/blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,15 @@ Block tnt = Block.TNT.withProperty("unstable", "true");
instance.setBlock(0, 41, 0, tnt);
```

## Registry
## BlockEntry
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should stay 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 by now, though we have the plan to make it modifiable in the future.

`BlockEntry` could be retrieved with `Block#registry()`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be retrieved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also: is unmodifiable for now
Might also help: thought we plan to make it modifiable in the future.


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