aboutsummaryrefslogtreecommitdiff
path: root/features/nether
diff options
context:
space:
mode:
Diffstat (limited to 'features/nether')
-rw-r--r--features/nether/index.js8
-rw-r--r--features/nether/metadata.json2
2 files changed, 7 insertions, 3 deletions
diff --git a/features/nether/index.js b/features/nether/index.js
index 4eb6fab..a7db6bb 100644
--- a/features/nether/index.js
+++ b/features/nether/index.js
@@ -71,7 +71,9 @@ class Nether extends Feature {
let blockState = this.getBlockIdFromState(packet[m.getBlockState.S23PacketBlockChange]())
let oldBlockState = this.getBlockIdFromState(World.getBlockStateAt(position))
if (oldBlockState === 20515 && blockState === 16419) {
- this.blocks.push({ loc: position, time: Date.now() + 3000 })
+ if (Math.abs(Player.getX() - position.getX()) <= 20 && Math.abs(Player.getY() - position.getY()) <= 20 && Math.abs(Player.getZ() - position.getZ()) <= 20) {
+ this.blocks.push({ loc: position, time: Date.now() + 3000 })
+ }
}
if (blockState === 57379) {
this.blocks = this.blocks.filter(b => {
@@ -98,7 +100,9 @@ class Nether extends Feature {
this.lastBlock = [position.getX(), position.getY(), position.getZ()]
}
if (oldBlockState === 20515 && blockState === 16419) {
- this.blocks.push({ loc: position, time: Date.now() + 3000 })
+ if (Math.abs(Player.getX() - position.getX()) <= 20 && Math.abs(Player.getY() - position.getY()) <= 20 && Math.abs(Player.getZ() - position.getZ()) <= 20) {
+ this.blocks.push({ loc: position, time: Date.now() + 3000 })
+ }
}
if (blockState === 57379) {
this.blocks = this.blocks.filter(b => {
diff --git a/features/nether/metadata.json b/features/nether/metadata.json
index 322c840..e68fb41 100644
--- a/features/nether/metadata.json
+++ b/features/nether/metadata.json
@@ -1,6 +1,6 @@
{
"name": "Nether",
- "description": "Nether features",
+ "description": "May cause some lag if enabled when not in nether",
"isHidden": false,
"isTogglable": true,
"defaultEnabled": true,