diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-05-01 20:25:17 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-05-01 20:25:17 +0800 |
commit | b5f6c8eafcb5c3fc0e5389f5927dc85bbbafba96 (patch) | |
tree | c42f52891286f7a3b7ec4e595697b4a110e4fb67 /features/nether | |
parent | 7483831198865f501c832f8f1f46c8fa95ccd197 (diff) | |
download | SoopyV2-b5f6c8eafcb5c3fc0e5389f5927dc85bbbafba96.tar.gz SoopyV2-b5f6c8eafcb5c3fc0e5389f5927dc85bbbafba96.tar.bz2 SoopyV2-b5f6c8eafcb5c3fc0e5389f5927dc85bbbafba96.zip |
update!
Diffstat (limited to 'features/nether')
-rw-r--r-- | features/nether/index.js | 8 | ||||
-rw-r--r-- | features/nether/metadata.json | 2 |
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, |