aboutsummaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-12-25 02:14:13 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-12-25 02:14:13 +0800
commit60ef5dc3f0cddd896bb719ace502c777288a4ffb (patch)
treefa53fff3512558843d758241618bad095094ef34 /features
parent0a2a213a310ead95f612f5da18b83a0b88b01f9e (diff)
downloadSoopyV2-60ef5dc3f0cddd896bb719ace502c777288a4ffb.tar.gz
SoopyV2-60ef5dc3f0cddd896bb719ace502c777288a4ffb.tar.bz2
SoopyV2-60ef5dc3f0cddd896bb719ace502c777288a4ffb.zip
fix ct 2.0 support
Diffstat (limited to 'features')
-rw-r--r--features/slayers/index.js35
1 files changed, 28 insertions, 7 deletions
diff --git a/features/slayers/index.js b/features/slayers/index.js
index 6f2bc15..3d3b32e 100644
--- a/features/slayers/index.js
+++ b/features/slayers/index.js
@@ -274,6 +274,16 @@ class Slayers extends Feature {
}
}
}
+ }else{ //CT 2.0 support
+ for(let x = pos[0] - 5; x <= pos[0] + 5; x++){
+ for(let y = pos[1] - 5; y <= pos[1] + 5; y++){
+ for(let z = pos[2] - 5; z <= pos[2] + 5; z++){
+ if(World.getBlockAt(Math.floor(x), Math.floor(y), Math.floor(z)).getType().getID() === 138){
+ this.beaconLocations[e[m.getUniqueID.Entity]().toString()] = [Math.floor(x), Math.floor(y), Math.floor(z)]
+ }
+ }
+ }
+ }
}
// if(!this.beaconLocations[e[m.getUniqueID.Entity]().toString()]){
@@ -305,13 +315,24 @@ class Slayers extends Feature {
return false
}
- if(World.getBlockAt(location[0], location[1], location[2]).getID() === 138){
- Client.showTitle("&cGO TO BEACON!","&c" + (Math.max(0,5000-(Date.now()-e[0]))/1000).toFixed(1) + "s",0,20,10)
- World.playSound("note.pling",1,1)
- }else{
- delete this.beaconPoints[e[1]]
- delete this.beaconLocations[e[1]]
- return false
+ if(World.getBlockAt(0,0,0).getID){
+ if(World.getBlockAt(location[0], location[1], location[2]).getID() === 138){
+ Client.showTitle("&cGO TO BEACON!","&c" + (Math.max(0,5000-(Date.now()-e[0]))/1000).toFixed(1) + "s",0,20,10)
+ World.playSound("note.pling",1,1)
+ }else{
+ delete this.beaconPoints[e[1]]
+ delete this.beaconLocations[e[1]]
+ return false
+ }
+ }else{ //CT 2.0 support
+ if(World.getBlockAt(location[0], location[1], location[2]).getType().getID() === 138){
+ Client.showTitle("&cGO TO BEACON!","&c" + (Math.max(0,5000-(Date.now()-e[0]))/1000).toFixed(1) + "s",0,20,10)
+ World.playSound("note.pling",1,1)
+ }else{
+ delete this.beaconPoints[e[1]]
+ delete this.beaconLocations[e[1]]
+ return false
+ }
}
return true
})