diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2021-12-25 00:25:52 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2021-12-25 00:25:52 +0800 |
commit | 999ef1f72ba85d8534805f3b08a9084e792fbf04 (patch) | |
tree | 17988ab21fed4980141e7755e974431430bf07ce | |
parent | 6695867c01a718d20800394fe0685fba598e57b6 (diff) | |
download | SoopyV2-999ef1f72ba85d8534805f3b08a9084e792fbf04.tar.gz SoopyV2-999ef1f72ba85d8534805f3b08a9084e792fbf04.tar.bz2 SoopyV2-999ef1f72ba85d8534805f3b08a9084e792fbf04.zip |
CI 2
-rw-r--r-- | CI/supporttest.js | 1 | ||||
-rw-r--r-- | features/betterGuis/index.js | 2 | ||||
-rw-r--r-- | features/dataLoader/index.js | 16 | ||||
-rw-r--r-- | features/slayers/index.js | 24 |
4 files changed, 30 insertions, 13 deletions
diff --git a/CI/supporttest.js b/CI/supporttest.js new file mode 100644 index 0000000..161135b --- /dev/null +++ b/CI/supporttest.js @@ -0,0 +1 @@ +console.log("This is running nodejs code rn")
\ No newline at end of file diff --git a/features/betterGuis/index.js b/features/betterGuis/index.js index c5f21f4..e9b7e8a 100644 --- a/features/betterGuis/index.js +++ b/features/betterGuis/index.js @@ -123,7 +123,7 @@ class BetterGuis extends Feature { if(this.museumGuiEnabled.getValue()) this.museumGui.tick.call(this.museumGui) if(this.replaceSbMenuClicks.getValue()){ - if(Player.getOpenedInventory().getName()==="SkyBlock Menu"){ + if(Player.getOpenedInventory() && Player.getOpenedInventory().getName()==="SkyBlock Menu"){ if(this.lastWindowId === 0){ this.lastWindowId = Player.getOpenedInventory().getWindowId() return; diff --git a/features/dataLoader/index.js b/features/dataLoader/index.js index 43b0f7a..42d0ec5 100644 --- a/features/dataLoader/index.js +++ b/features/dataLoader/index.js @@ -69,12 +69,16 @@ class DataLoader extends Feature { step(){ //2fps this.stats["Area"] = undefined this.stats["Dungeon"] = undefined - TabList.getNames().forEach(n=>{ - n = ChatLib.removeFormatting(n) - if(n.includes(": ")){ - this.stats[n.split(": ")[0].trim()] = n.split(": ")[1].trim() - } - }) + + if(TabList && TabList.getNames()){ + TabList.getNames().forEach(n=>{ + n = ChatLib.removeFormatting(n) + if(n.includes(": ")){ + this.stats[n.split(": ")[0].trim()] = n.split(": ")[1].trim() + } + }) + } + if(this.stats["Dungeon"]){ this.stats["Area"] = this.stats["Dungeon"] this.isInDungeon = true diff --git a/features/slayers/index.js b/features/slayers/index.js index c09efd7..2ebe0fe 100644 --- a/features/slayers/index.js +++ b/features/slayers/index.js @@ -206,7 +206,7 @@ class Slayers extends Feature { } - this.todoE.forEach(e=>{ + this.todoE.forEach((e)=>{ try{ if(e instanceof net.minecraft.entity.item.EntityArmorStand && e[m.getEquipmentInSlot](4)){ if(e[m.getEquipmentInSlot](4)[m.getDisplayName.ItemStack]() === "Beacon"){ @@ -264,11 +264,23 @@ class Slayers extends Feature { let pos = [e[f.posX.Entity]+0.5, e[f.posY.Entity]+0.7, e[f.posZ.Entity]+0.5] //check for a beacon block within 5 blocks of pos - 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)).getID() === 138){ - this.beaconLocations[e[m.getUniqueID.Entity]().toString()] = [Math.floor(x), Math.floor(y), Math.floor(z)] + if(World.getBlockAt(0,0,0).getID){ + 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)).getID() === 138){ + this.beaconLocations[e[m.getUniqueID.Entity]().toString()] = [Math.floor(x), Math.floor(y), Math.floor(z)] + } + } + } + } + }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)] + } } } } |