aboutsummaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
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
})