From 0281196ad14ce0486b1c0033f23e60a19769b2a8 Mon Sep 17 00:00:00 2001 From: Leon Date: Sun, 28 Aug 2022 21:46:30 +0800 Subject: [PATCH 1/4] Update document about Block --- world/blocks.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/world/blocks.md b/world/blocks.md index d9615ad..1dc8e07 100644 --- a/world/blocks.md +++ b/world/blocks.md @@ -26,9 +26,15 @@ Block tnt = Block.TNT.withProperty("unstable", "true"); instance.setBlock(0, 41, 0, tnt); ``` -## Registry +## BlockEntry -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()`. ```java Block block = Block.GRASS; From a610114c5bc8da05cf1c0ff4da4ddbbdc6e97a3c Mon Sep 17 00:00:00 2001 From: Leon Date: Sun, 28 Aug 2022 23:18:09 +0800 Subject: [PATCH 2/4] Revert "Update document about Block" This reverts commit 0281196ad14ce0486b1c0033f23e60a19769b2a8. --- world/blocks.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/world/blocks.md b/world/blocks.md index 1dc8e07..d9615ad 100644 --- a/world/blocks.md +++ b/world/blocks.md @@ -26,15 +26,9 @@ Block tnt = Block.TNT.withProperty("unstable", "true"); instance.setBlock(0, 41, 0, tnt); ``` -## BlockEntry +## 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()`. +Each block has unique data which can be retrieved with `Block#registry()`. ```java Block block = Block.GRASS; From e2a08c37f2df59260afe479d439a9a6ea7d12def Mon Sep 17 00:00:00 2001 From: Leon Date: Sun, 28 Aug 2022 23:23:41 +0800 Subject: [PATCH 3/4] Update document about Block Registry --- world/blocks.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/world/blocks.md b/world/blocks.md index d9615ad..33ac5d2 100644 --- a/world/blocks.md +++ b/world/blocks.md @@ -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 by now, though we have the plan to make it modifiable in the future. + +`BlockEntry` could be retrieved with `Block#registry()`. ```java Block block = Block.GRASS; From 569f6706ed8ea3a264df884bb53d893c4596466f Mon Sep 17 00:00:00 2001 From: Anzide Date: Sun, 28 Aug 2022 23:39:34 +0800 Subject: [PATCH 4/4] Fixed grammatical errors in Block --- world/blocks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/world/blocks.md b/world/blocks.md index 33ac5d2..0d48b47 100644 --- a/world/blocks.md +++ b/world/blocks.md @@ -32,9 +32,9 @@ Each block is associated with a `BlockEntry`,which store some **unmodifiable **( 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` is unmodifiable for now, though we plan to make it modifiable in the future. -`BlockEntry` could be retrieved with `Block#registry()`. +`BlockEntry` can be retrieved with `Block#registry()`. ```java Block block = Block.GRASS;