aboutsummaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/betterGuis/index.js7
-rw-r--r--features/cosmetics/cosmetic/dragon/dragonWings.js132
-rw-r--r--features/cosmetics/index.js11
-rw-r--r--features/dungeonMap/index.js9
-rw-r--r--features/events/index.js7
-rw-r--r--features/fragBot/index.js2
-rw-r--r--features/hud/index.js26
-rw-r--r--features/mining/index.js9
-rw-r--r--features/settings/settingsCommunicator.js4
-rw-r--r--features/slayers/index.js41
-rw-r--r--features/streamsGUI/index.js2
11 files changed, 141 insertions, 109 deletions
diff --git a/features/betterGuis/index.js b/features/betterGuis/index.js
index 2150db2..29a7399 100644
--- a/features/betterGuis/index.js
+++ b/features/betterGuis/index.js
@@ -2,6 +2,7 @@
/// <reference lib="es2015" />
import Feature from "../../featureClass/class";
import logger from "../../logger";
+import { f } from "../../mappings/mappings";
import ToggleSetting from "../settings/settingThings/toggle";
import MuseumGui from "./museumGui.js";
@@ -16,9 +17,9 @@ class BetterGuis extends Feature {
this.museumGui = new MuseumGui()
this.replaceSbMenuClicks = new ToggleSetting("Improve Clicks on SBMENU", "This will change clicks to middle clicks, AND use commands where possible (eg /pets)", true, "sbmenu_clicks", this)
- this.reliableSbMenuClicks = {getValue: ()=>false}//removed because hypixel fixed may add back later //new ToggleSetting("Make SBMENU clicks reliable", "This will delay clicks on sbmenu to time them so they dont get canceled", true, "sbmenu_time", this)
+ this.reliableSbMenuClicks = {getValue: ()=>false}//removed because hypixel fixed, code kept incase hypixel adds back bug later //new ToggleSetting("Make SBMENU clicks reliable", "This will delay clicks on sbmenu to time them so they dont get canceled", true, "sbmenu_time", this)
- this.museumGuiEnabled = /*{getValue: ()=>false} //Removed because not finished yet*/ new ToggleSetting("Custom Museum GUI", "Custom gui for the Museum", true, "custom_museum_enabled", this)
+ this.museumGuiEnabled = new ToggleSetting("Custom Museum GUI", "Custom gui for the Museum", true, "custom_museum_enabled", this)
this.lastWindowId = 0
this.shouldHold = 10
@@ -108,7 +109,7 @@ class BetterGuis extends Feature {
let hoveredSlot = gui.getSlotUnderMouse()
if(!hoveredSlot) return
- let hoveredSlotId = hoveredSlot.field_75222_d
+ let hoveredSlotId = hoveredSlot[f.slotNumber]
// logger.logMessage(hoveredSlotId, 4)
diff --git a/features/cosmetics/cosmetic/dragon/dragonWings.js b/features/cosmetics/cosmetic/dragon/dragonWings.js
index cbf2879..4044e85 100644
--- a/features/cosmetics/cosmetic/dragon/dragonWings.js
+++ b/features/cosmetics/cosmetic/dragon/dragonWings.js
@@ -1,3 +1,4 @@
+import { f, m, m } from "../../../../mappings/mappings.js";
import Cosmetic from "../../cosmetic.js";
const ModelDragon = Java.type("net.minecraft.client.model.ModelDragon")
@@ -12,8 +13,8 @@ let textures = {//TODO: dynamicly load textures from server
classic: new Image(javax.imageio.ImageIO.read(new java.io.File("./config/ChatTriggers/modules/SoopyV2/features/cosmetics/textures/dragon/classic.png"))),
purple: new Image(javax.imageio.ImageIO.read(new java.io.File("./config/ChatTriggers/modules/SoopyV2/features/cosmetics/textures/dragon/purple.png")))
}
-let wing = getField(dragon, "field_78225_k")
-let wingTip = getField(dragon, "field_78222_l")
+let wing = getField(dragon, f.wing)
+let wingTip = getField(dragon, f.wingTip)
class DragonWings extends Cosmetic {
constructor(player, parent) {
@@ -28,11 +29,12 @@ class DragonWings extends Cosmetic {
onRenderEntity(ticks, isInGui){
- if(this.player.getPlayer().func_98034_c(Player.getPlayer())){
+ if(this.player.getPlayer()[m.isInvisibleToPlayer](Player.getPlayer())){
return
}
- if(!this.parent.firstPersonVisable.getValue() && Client.getMinecraft().field_71474_y.field_74320_O === 0) return
+ let thirdPersonView = Client.getMinecraft()[f.gameSettings.Minecraft][f.thirdPersonView]
+ if(!this.parent.firstPersonVisable.getValue() && thirdPersonView === 0) return
let isSelfPlayer = this.player.getUUID().toString() === Player.getUUID().toString()
let isInInv = isSelfPlayer && ticks === 1
@@ -43,12 +45,12 @@ class DragonWings extends Cosmetic {
let timeSince = (Date.now()-this.lastRender)/1000
this.lastRender = Date.now()
- let rotation = isInInv?0:this.player.getPlayer().field_70760_ar+(this.player.getPlayer().field_70761_aq-this.player.getPlayer().field_70760_ar)*ticks
+ let rotation = isInInv?0:this.player.getPlayer()[f.prevRenderYawOffset]+(this.player.getPlayer()[f.renderYawOffset]-this.player.getPlayer()[f.prevRenderYawOffset])*ticks
// rotation += entity.field_70761_aq+(entity.field_70761_aq-entity.field_70760_ar)*ticks
// console.log(rotation, entity.getEntity().field_70761_aq+(entity.getEntity().field_70761_aq-entity.getEntity().field_70760_ar)*ticks)
- let horisontalSpeed = Math.sqrt((this.player.getPlayer().field_70165_t-this.player.getPlayer().field_70142_S)**2+(this.player.getPlayer().field_70161_v-this.player.getPlayer().field_70136_U)**2)
+ let horisontalSpeed = Math.sqrt((this.player.getPlayer()[f.posX.Entity]-this.player.getPlayer()[f.lastTickPosX])**2+(this.player.getPlayer()[f.posZ.Entity]-this.player.getPlayer()[f.lastTickPosZ])**2)
- let verticleSpeed = this.player.getPlayer().field_70163_u-this.player.getPlayer().field_70137_T
+ let verticleSpeed = this.player.getPlayer()[f.posZ.Entity]-this.player.getPlayer()[f.lastTickPosZ]
this.animOffset += Math.min(1, horisontalSpeed)*10*timeSince+1*timeSince
@@ -62,18 +64,18 @@ class DragonWings extends Cosmetic {
let wingBackAmount = 0
- if(this.player.getPlayer().field_70172_ad > 15){ //damage tick
+ if(this.player.getPlayer()[f.hurtResistantTime] > 15){ //damage tick
this.animOffset += 15*timeSince
}
// if((this.player === Player &&this.player.getPlayer().field_71075_bZ.field_75100_b) || (this.player !== Player && Math.abs(verticleSpeed)<0.2 && !this.player.getPlayer().field_70122_E)){//playerCapabilities.isFlying
- if((verticleSpeed>-0.2) && !this.player.getPlayer().field_70122_E && !isInGui){ //flying
+ if((verticleSpeed>-0.2) && !this.player.getPlayer()[f.onGround.Entity] && !isInGui){ //flying
this.animOffset += 5*timeSince //flap in mid air
flapAmountMultiplyer *= 1.75 //flap harder
- if(isSelfPlayer && Client.getMinecraft().field_71474_y.field_74320_O === 0){
+ if(isSelfPlayer && thirdPersonView === 0){
if(!this.parent.lessFirstPersonVisable.getValue()){
flapAmountMultiplyerNoEnd += 0.4
flapMainOffsetThing = 0.3
@@ -101,14 +103,14 @@ class DragonWings extends Cosmetic {
this.animOffset += (verticleSpeed+0.5)*-3*timeSince
}
- GlStateManager.func_179094_E(); // pushMatrix
+ GlStateManager[m.pushMatrix](); // pushMatrix
Tessellator.colorize(this.settings.color.r, this.settings.color.g, this.settings.color.b);
if(!isSelfPlayer){
Tessellator.translate(
- (this.player.getPlayer().field_70142_S + (this.player.getPlayer().field_70165_t-this.player.getPlayer().field_70142_S) * ticks) - (Player.getPlayer().field_70142_S + (Player.getPlayer().field_70165_t-Player.getPlayer().field_70142_S) * ticks),
- (this.player.getPlayer().field_70137_T + (this.player.getPlayer().field_70163_u-this.player.getPlayer().field_70137_T) * ticks) - (Player.getPlayer().field_70137_T + (Player.getPlayer().field_70163_u-Player.getPlayer().field_70137_T) * ticks),
- (this.player.getPlayer().field_70136_U + (this.player.getPlayer().field_70161_v-this.player.getPlayer().field_70136_U) * ticks) - (Player.getPlayer().field_70136_U + (Player.getPlayer().field_70161_v-Player.getPlayer().field_70136_U) * ticks))
+ (this.player.getPlayer()[f.lastTickPosX] + (this.player.getPlayer()[f.posX.Entity]-this.player.getPlayer()[f.lastTickPosX]) * ticks) - (Player.getPlayer()[f.lastTickPosX] + (Player.getPlayer()[f.posX.Entity]-Player.getPlayer()[f.lastTickPosX]) * ticks),
+ (this.player.getPlayer()[f.lastTickPosY] + (this.player.getPlayer()[f.posY.Entity]-this.player.getPlayer()[f.lastTickPosY]) * ticks) - (Player.getPlayer()[f.lastTickPosY] + (Player.getPlayer()[f.posY.Entity]-Player.getPlayer()[f.lastTickPosY]) * ticks),
+ (this.player.getPlayer()[f.lastTickPosZ] + (this.player.getPlayer()[f.posZ.Entity]-this.player.getPlayer()[f.lastTickPosZ]) * ticks) - (Player.getPlayer()[f.lastTickPosZ] + (Player.getPlayer()[f.posZ.Entity]-Player.getPlayer()[f.lastTickPosZ]) * ticks))
}
if(textures[this.settings.texture || "classic"]){
@@ -117,25 +119,25 @@ class DragonWings extends Cosmetic {
Tessellator.bindTexture(textures.classic) //bind default texture (classic)
}
- if(this.player.getPlayer().field_70154_o){
- rotation = this.player.getPlayer().field_70759_as+(this.player.getPlayer().field_70759_as-this.player.getPlayer().field_70758_at)*ticks
+ if(this.player.getPlayer()[f.ridingEntity.Entity]){
+ rotation = this.player.getPlayer()[f.rotationYawHead]+(this.player.getPlayer()[f.rotationYawHead]-this.player.getPlayer()[f.prevRotationYawHead])*ticks
}
- if(!this.player.getPlayer().func_70608_bn()){ //dont rotate when in bed
+ if(!this.player.getPlayer()[m.isPlayerSleeping]()){ //dont rotate when in bed
Tessellator.rotate((180-rotation),0,1,0)
Tessellator.translate(0,1.2,0.1)
- if(this.player.getPlayer().func_70093_af()){ //isSneaking
+ if(this.player.getPlayer()[m.isSneaking.Entity]()){ //isSneaking
Tessellator.translate(0, -0.125,0)
Tessellator.rotate(-20, 1,0,0)
Tessellator.translate(0, 0,0.1)
- if(isSelfPlayer && Client.getMinecraft().field_71474_y.field_74320_O === 0){}else{
+ if(isSelfPlayer && thirdPersonView === 0){}else{
Tessellator.translate(0, -0.125,0)
}
}
- if(isSelfPlayer && !isInInv && Client.getMinecraft().field_71474_y.field_74320_O === 0){
+ if(isSelfPlayer && !isInInv && thirdPersonView === 0){
//Make wings less scuffed when in first person looking down/up
Tessellator.translate(0, 0.25, 0.003*(this.player.getPitch()))
}
@@ -143,14 +145,14 @@ class DragonWings extends Cosmetic {
//Higher = more elytra like
- wing.field_78796_g = 0.25; //rotateAngleY
+ wing[f.rotateAngleZ] = 0.25; //rotateAngleY
let shouldStandingStillWingThing = false
let changeStandingStillWingThing = 0
if(horisontalSpeed < 0.01){
- if(!((verticleSpeed>-0.2) && !this.player.getPlayer().field_70122_E)){ //not flying
+ if(!((verticleSpeed>-0.2) && !this.player.getPlayer()[f.onGround.Entity])){ //not flying
let amt = (this.animOffset+Math.PI/2)%(20*Math.PI)
if(amt < 1*Math.PI){
this.animOffset += 2*timeSince*Math.min(1,(amt/(1*Math.PI))*2)
@@ -162,22 +164,22 @@ class DragonWings extends Cosmetic {
flapAmountMultiplyer += (1-(amt/(1*Math.PI)-1))/2
}
}
- if(this.player.getPlayer().func_70093_af()){ //isSneaking
- if(this.player.getPlayer().field_70125_A > 20){
+ if(this.player.getPlayer()[m.isSneaking.Entity]()){ //isSneaking
+ if(this.player.getPlayer()[f.rotationPitch] > 20){
shouldStandingStillWingThing = true
- changeStandingStillWingThing = Math.max(0,this.player.getPlayer().field_70125_A/600)
+ changeStandingStillWingThing = Math.max(0,this.player.getPlayer()[f.rotationPitch]/600)
}
}
}
if(shouldStandingStillWingThing){
- wing.field_78796_g = 0.25+(changeStandingStillWingThing)*3
+ wing[f.rotateAngleY] = 0.25+(changeStandingStillWingThing)*3
}
- if(this.player.getPlayer().func_70608_bn()){ //player in bed
+ if(this.player.getPlayer()[m.isPlayerSleeping]()){ //player in bed
try{ //try catch incase no bed at that location
- let facing = World.getWorld().func_180495_p(this.player.getPlayer().field_71081_bT).func_177229_b(FACING).func_176736_b() //0-3 is S-W-N-E
+ let facing = World.getWorld().func_180495_p(this.player.getPlayer()[f.playerLocation])[m.getValue.BlockState$StateImplementation](FACING)[m.getHorizontalIndex]() //0-3 is S-W-N-E
let rotation = 0
switch(facing){
@@ -203,12 +205,12 @@ class DragonWings extends Cosmetic {
Tessellator.translate(0, 0.75-this.settings.scale*100,0)
Tessellator.rotate(rotation, 0, 1, 0)
- wing.field_78795_f = 0; //rotateAngleX
+ wing[f.rotateAngleX] = 0; //rotateAngleX
- wing.field_78808_h = (-0.5+Math.sin(this.animOffset/5)*0.1)*this.settings.scale*100; //rotateAngleZ
+ wing[f.rotateAngleZ] = (-0.5+Math.sin(this.animOffset/5)*0.1)*this.settings.scale*100; //rotateAngleZ
- wingTip.field_78808_h = -2.20+Math.sin(this.animOffset/5)*0.1
+ wingTip[f.rotateAngleZ] = -2.20+Math.sin(this.animOffset/5)*0.1
}catch(e){}
}else if(wingBackAmount === 0){
//tilt
@@ -219,7 +221,7 @@ class DragonWings extends Cosmetic {
wing_tilt_offset += (changeStandingStillWingThing)*4
}
- wing.field_78795_f = 0.75 - Math.cos(this.animOffset) * 0.2+wing_tilt_offset; //rotateAngleX
+ wing[f.rotateAngleX] = 0.75 - Math.cos(this.animOffset) * 0.2+wing_tilt_offset; //rotateAngleX
let wing_goback_amount = 0.15/(Math.min(1, horisontalSpeed)*3+0.25)
@@ -237,74 +239,74 @@ class DragonWings extends Cosmetic {
temp_horis_wingthing = -(changeStandingStillWingThing)*0.75
}
- wing.field_78808_h = (Math.sin(this.animOffset)/temp_wing_thing + 0.125) * wing_goback_amount*(1+(flapAmountMultiplyer-1)*1)*flapAmountMultiplyerNoEnd -0.4-wing_tilt_offset/3+temp_horis_wingthing+flapMainOffsetThing; //rotateAngleZ
+ wing[f.rotateAngleZ] = (Math.sin(this.animOffset)/temp_wing_thing + 0.125) * wing_goback_amount*(1+(flapAmountMultiplyer-1)*1)*flapAmountMultiplyerNoEnd -0.4-wing_tilt_offset/3+temp_horis_wingthing+flapMainOffsetThing; //rotateAngleZ
- wingTip.field_78808_h = -((Math.sin((this.animOffset+1.5+(1-temp_wing_thing)/8.5))/(1+(temp_wing_thing-1)/3) + 0.5)) * 0.75*(1+(flapAmountMultiplyer-1)*1)/(1+temp_horis_wingthing) - (1-flapAmountMultiplyer)*2-(1-temp_wing_thing)/10+wingEndOffsetThing; //rotateAngleZ
+ wingTip[f.rotateAngleZ] = -((Math.sin((this.animOffset+1.5+(1-temp_wing_thing)/8.5))/(1+(temp_wing_thing-1)/3) + 0.5)) * 0.75*(1+(flapAmountMultiplyer-1)*1)/(1+temp_horis_wingthing) - (1-flapAmountMultiplyer)*2-(1-temp_wing_thing)/10+wingEndOffsetThing; //rotateAngleZ
}else{
//tilt
let wing_tilt_offset = -Math.min(0.8, horisontalSpeed*3) //When go faster tilt wing back so its in direction of wind
- wing.field_78795_f = 0.75 - Math.cos(this.animOffset) * 0.2+wing_tilt_offset-wingBackAmount/2; //rotateAngleX
+ wing[f.rotateAngleX] = 0.75 - Math.cos(this.animOffset) * 0.2+wing_tilt_offset-wingBackAmount/2; //rotateAngleX
- wing.field_78808_h = -wingBackAmount; //rotateAngleZ
+ wing[f.rotateAngleZ] = -wingBackAmount; //rotateAngleZ
- wingTip.field_78808_h = -((Math.sin((this.animOffset))*0.5 + 0.3))
+ wingTip[f.rotateAngleZ] = -((Math.sin((this.animOffset))*0.5 + 0.3))
}
- GlStateManager.func_179129_p() //disable culling
+ GlStateManager[m.disableCull]() //disable culling
let wing_center_dist = ((0-Math.log(1000*this.settings.scale+0.01)-2)-100000*this.settings.scale*this.settings.scale)/1000
// GL11.glDepthMask(GL11.GL_FALSE);
Tessellator.translate(-wing_center_dist, 0, 0)
Tessellator.scale(this.settings.scale, this.settings.scale, this.settings.scale)
- wing.func_78791_b(1) //render left wing
+ wing[m.renderWithRotation](1) //render left wing
Tessellator.translate(2*wing_center_dist/this.settings.scale, 0, 0)
Tessellator.scale(-1, 1, 1)
- wing.func_78791_b(1) //render right wing
+ wing[m.renderWithRotation](1) //render right wing
- if(this.player.getPlayer().field_70737_aN > 0){ //damage tick
- GlStateManager.func_179094_E(); // pushMatrix
- GlStateManager.func_179143_c(514);
- GlStateManager.func_179090_x();
- GlStateManager.func_179147_l();
- GlStateManager.func_179112_b(770, 771);
- GlStateManager.func_179131_c(1, 0, 0, 0.25);
+ if(this.player.getPlayer()[f.hurtTime] > 0){ //damage tick
+ GlStateManager[m.pushMatrix](); // pushMatrix
+ GlStateManager[m.depthFunc](514);
+ GlStateManager[m.disableTexture2D]();
+ GlStateManager[m.enableBlend]();
+ GlStateManager[m.blendFunc](770, 771);
+ GlStateManager.func_179131_c(1, 0, 0, 0.25); //m.color.glstatemanager.ffff
Tessellator.scale(-1, 1, 1)
Tessellator.translate(-2*wing_center_dist/this.settings.scale, 0, 0)
- wing.func_78791_b(1) //render left wing
+ wing[m.renderWithRotation](1) //render left wing
Tessellator.translate(2*wing_center_dist/this.settings.scale, 0, 0)
Tessellator.scale(-1, 1, 1)
- wing.func_78791_b(1) //render right wing
+ wing[m.renderWithRotation](1) //render right wing
- GlStateManager.func_179098_w();
- GlStateManager.func_179084_k();
- GlStateManager.func_179143_c(515);
- GlStateManager.func_179121_F(); // popMatrix
+ GlStateManager[m.enableTexture2D]();
+ GlStateManager[m.disableBlend]();
+ GlStateManager[m.depthFunc](515);
+ GlStateManager[m.popMatrix](); // popMatrix
}
Tessellator.colorize(1, 1, 1)
- GlStateManager.func_179089_o() //enable culling
- GlStateManager.func_179121_F(); // popMatrix
+ GlStateManager[m.enableCull]() //enable culling
+ GlStateManager[m.popMatrix](); // popMatrix
}
testPlaySound(){
- if(this.player.getPlayer().func_98034_c(Player.getPlayer())){
+ if(this.player.getPlayer()[m.isInvisibleToPlayer](Player.getPlayer())){
return
}
- let horisontalSpeed = Math.sqrt((this.player.getPlayer().field_70165_t-this.player.getPlayer().field_70142_S)**2+(this.player.getPlayer().field_70161_v-this.player.getPlayer().field_70136_U)**2)
+ let horisontalSpeed = Math.sqrt((this.player.getPlayer()[f.posX.Entity]-this.player.getPlayer()[f.lastTickPosX])**2+(this.player.getPlayer()[f.posZ.Entity]-this.player.getPlayer()[f.lastTickPosZ])**2)
- let verticleSpeed = this.player.getPlayer().field_70163_u-this.player.getPlayer().field_70137_T
+ let verticleSpeed = this.player.getPlayer()[f.posZ.Entity]-this.player.getPlayer()[f.lastTickPosZ]
// if((this.player === Player &&this.player.getPlayer().field_71075_bZ.field_75100_b) || (this.player !== Player && Math.abs(verticleSpeed)<0.2 && !this.player.getPlayer().field_70122_E)){//playerCapabilities.isFlying
- if((verticleSpeed>-0.2) && !this.player.getPlayer().field_70122_E){ //flying
+ if((verticleSpeed>-0.2) && !this.player.getPlayer()[f.onGround.Entity]){ //flying
if(this.animOffset-this.lastFlapSound > 2*Math.PI){
@@ -316,7 +318,7 @@ class DragonWings extends Cosmetic {
}
if(horisontalSpeed < 0.01){
- if(!((verticleSpeed>-0.2) && !this.player.getPlayer().field_70122_E)){ //not flying
+ if(!((verticleSpeed>-0.2) && !this.player.getPlayer()[f.onGround.Entity])){ //not flying
let amt = (this.animOffset+Math.PI/2)%(20*Math.PI)
if(amt < 1*Math.PI){
if(amt > 0.65*Math.PI && (2*Math.PI+this.animOffset)-this.lastFlapSound > 2*Math.PI){
@@ -367,19 +369,19 @@ class DragonWings extends Cosmetic {
this.lastRender = Date.now()
- let horisontalSpeed = Math.sqrt((this.player.getPlayer().field_70165_t-this.player.getPlayer().field_70142_S)**2+(this.player.getPlayer().field_70161_v-this.player.getPlayer().field_70136_U)**2)
+ let horisontalSpeed = Math.sqrt((this.player.getPlayer()[f.posX.Entity]-this.player.getPlayer()[f.lastTickPosX])**2+(this.player.getPlayer()[f.posZ.Entity]-this.player.getPlayer()[f.lastTickPosZ])**2)
- let verticleSpeed = this.player.getPlayer().field_70163_u-this.player.getPlayer().field_70137_T
+ let verticleSpeed = this.player.getPlayer()[f.posZ.Entity]-this.player.getPlayer()[f.lastTickPosZ]
this.animOffset += Math.min(1, horisontalSpeed)*10*timeSince+1*timeSince
- if(this.player.getPlayer().field_70172_ad > 0){ //damage tick
+ if(this.player.getPlayer()[f.hurtResistantTime] > 0){ //damage tick
this.animOffset += 5*timeSince
}
// if((this.player === Player &&this.player.getPlayer().field_71075_bZ.field_75100_b) || (this.player !== Player && Math.abs(verticleSpeed)<0.2 && !this.player.getPlayer().field_70122_E)){//playerCapabilities.isFlying
- if((verticleSpeed>-0.2) && !this.player.getPlayer().field_70122_E){ //flying
+ if((verticleSpeed>-0.2) && !this.player.getPlayer()[f.onGround]){ //flying
this.animOffset += 5*timeSince //flap in mid air
if(verticleSpeed > 0){
@@ -391,7 +393,7 @@ class DragonWings extends Cosmetic {
}
if(horisontalSpeed < 0.01){
- if(!((verticleSpeed>-0.2) && !this.player.getPlayer().field_70122_E)){ //not flying
+ if(!((verticleSpeed>-0.2) && !this.player.getPlayer()[f.onGround])){ //not flying
let amt = (this.animOffset+Math.PI/2)%(20*Math.PI)
if(amt < 1*Math.PI){
this.animOffset += 2*timeSince*Math.min(1,(amt/(1*Math.PI))*2)
diff --git a/features/cosmetics/index.js b/features/cosmetics/index.js
index 329a7f5..6457be0 100644
--- a/features/cosmetics/index.js
+++ b/features/cosmetics/index.js
@@ -3,6 +3,7 @@
import Feature from "../../featureClass/class";
import DragonWings from "./cosmetic/dragon/dragonWings"
import Toggle from "../settings/settingThings/toggle"
+import { f } from "../../mappings/mappings";
class Cosmetics extends Feature {
constructor() {
@@ -41,14 +42,14 @@ class Cosmetics extends Feature {
this.registerStep(false, 60*10, ()=>{
new Thread(()=>{this.loadCosmeticsData.call(this)}).start()
})
- // this.registerEvent("renderEntity", this.renderEntity)
+ this.registerEvent("renderEntity", this.renderEntity)
this.loadedRenderEntity = false
}
renderWorld(ticks){
- this.loadedCosmetics.forEach(cosmetic => {
+ for(cosmetic of this.loadedCosmetics){
cosmetic.onRenderEntity(ticks, false)
- })
+ }
}
renderEntity(entity, pos, ticks, event){
@@ -66,7 +67,7 @@ class Cosmetics extends Feature {
this.cosmeticsData = data
this.playerHasACosmeticA = !!data[Player.getUUID().toString().replace(/-/g,"")]
if(this.playerHasACosmeticA && !this.loadedRenderEntity){
- this.registerEvent("renderEntity", this.renderEntity)
+ // this.registerEvent("renderEntity", this.renderEntity)
this.loadedRenderEntity = true
}
@@ -157,7 +158,7 @@ class Cosmetics extends Feature {
this.loadedCosmetics = this.loadedCosmetics.filter(cosmetic => {
if(tick) cosmetic.onTick()
if(cosmetic.player.getUUID().toString() === Player.getUUID().toString()) return true
- if(cosmetic.player.getPlayer().field_70128_L){ //filter out players that are no longer loaded
+ if(cosmetic.player.getPlayer()[f.isDead]){ //filter out players that are no longer loaded
this.uuidToCosmetic[cosmetic.id][cosmetic.player.getUUID().toString().replace(/-/g,"")] = undefined
this.uuidToCosmeticDirect[cosmetic.player.getUUID().toString()] = undefined
diff --git a/features/dungeonMap/index.js b/features/dungeonMap/index.js
index 12bd471..a57edfc 100644
--- a/features/dungeonMap/index.js
+++ b/features/dungeonMap/index.js
@@ -1,6 +1,7 @@
/// <reference types="../../../CTAutocomplete" />
/// <reference lib="es2015" />
import Feature from "../../featureClass/class";
+import { f, m } from "../../mappings/mappings";
const BufferedImage = Java.type("java.awt.image.BufferedImage")
class DungeonMap extends Feature {
@@ -120,11 +121,11 @@ class DungeonMap extends Feature {
let mapData
try {
let item = Player.getInventory().getStackInSlot(8)
- mapData = item.getItem().func_77873_a(item.getItemStack(), World.getWorld()); // ItemStack.getItem().getMapData()
+ mapData = item.getItem()[m.getMapData](item.getItemStack(), World.getWorld()); // ItemStack.getItem().getMapData()
} catch (error) {
}
if(mapData){
- mapData.field_76203_h.forEach((icon, vec4b) => {
+ mapData[f.mapDecorations].forEach((icon, vec4b) => {
let x = vec4b.func_176112_b()
let y = vec4b.func_176113_c()
let rot = vec4b.func_176111_d()
@@ -148,7 +149,7 @@ class DungeonMap extends Feature {
});
// console.log("has map data poggies")
- let bytes = mapData.field_76198_e
+ let bytes = mapData[f.colors.MapData]
let x = 0
let y = 0
@@ -157,7 +158,7 @@ class DungeonMap extends Feature {
if(bytes[i] !== 0){
let j = bytes[i]&255
- let color = net.minecraft.block.material.MapColor.field_76281_a[j>>2].func_151643_b(j & 3);
+ let color = net.minecraft.block.material.MapColor[f.mapColorArray][j>>2][m.getMapColor](j & 3);
mapImage.setRGB(x, y, color)
newImage.setRGB(x, y, color)
}
diff --git a/features/events/index.js b/features/events/index.js
index 5586503..6769789 100644
--- a/features/events/index.js
+++ b/features/events/index.js
@@ -1,6 +1,7 @@
/// <reference types="../../../CTAutocomplete" />
/// <reference lib="es2015" />
import Feature from "../../featureClass/class";
+import { f } from "../../mappings/mappings";
import { drawBoxAtBlock, drawBoxAtBlockNotVisThruWalls, drawLine } from "../../utils/renderUtils";
import { calculateDistance, calculateDistanceQuick, fastestPathThrough } from "../../utils/utils";
import HudTextElement from "../hud/HudTextElement";
@@ -63,9 +64,9 @@ class Events extends Feature {
renderWorld(ticks){
if(this.showingWaypoints && this.lastPathCords && this.burrialWaypointsPath.getValue()){
- let startPoint = [Player.getPlayer().field_70142_S+Player.getPlayer().field_70159_w*ticks,
- Player.getPlayer().field_70137_T+Player.getPlayer().field_70181_x*ticks,
- Player.getPlayer().field_70136_U+Player.getPlayer().field_70179_y*ticks]
+ let startPoint = [Player.getPlayer()[f.lastTickPosX]+Player.getPlayer()[f.motionX.Entity]*ticks,
+ Player.getPlayer()[f.lastTickPosY]+Player.getPlayer()[f.motionY.Entity]*ticks,
+ Player.getPlayer()[f.lastTickPosZ]+Player.getPlayer()[f.motionZ.Entity]*ticks]
let lastPoint = startPoint || [0,0,0]
diff --git a/features/fragBot/index.js b/features/fragBot/index.js
index 48bfd87..c2d2d19 100644
--- a/features/fragBot/index.js
+++ b/features/fragBot/index.js
@@ -19,7 +19,7 @@ class FragBot extends Feature {
new SettingBase("To host a fragbot use /fragbot", "", undefined, "host_fragbot_info", this)
new SettingBase("NOTE: All this does atm is accept party invites", "More features for this coming soon", true, "stat_next_to_name_description", this)
- this.uploadToWebsite = new ToggleSetting("Advertise fragbot status", "Will show up as a fragbot in other peoples fragbot lists", true, "advertise_fragbot", this)
+ // this.uploadToWebsite = new ToggleSetting("Advertise fragbot status", "Will show up as a fragbot in other peoples fragbot lists", true, "advertise_fragbot", this)
this.registerCommand("fragbot", this.fragbotCommand)
diff --git a/features/hud/index.js b/features/hud/index.js
index 704c954..8e2b826 100644
--- a/features/hud/index.js
+++ b/features/hud/index.js
@@ -2,6 +2,7 @@
/// <reference lib="es2015" />
import SoopyNumber from "../../../guimanager/Classes/SoopyNumber";
import Feature from "../../featureClass/class";
+import { m } from "../../mappings/mappings";
import LocationSetting from "../settings/settingThings/location";
import ToggleSetting from "../settings/settingThings/toggle";
import HudTextElement from "./HudTextElement";
@@ -113,6 +114,8 @@ class Hud extends Feature {
this.lastframe = 0
this.slowestFrameTime = 0
+ this.lastSwappedPet = 0
+
this.lastWitherImpact = 0
this.aup = 0
this.lastTickEventEpochTimestamp = 0
@@ -137,23 +140,33 @@ class Hud extends Feature {
this.registerChat("&cAutopet &eequipped your ${pet}&e! &a&lVIEW RULE&r", (pet)=>{
this.petElement.setText("&6Pet&7> "+pet)
this.petText = "&6Pet&7> "+pet
+
+ this.lastSwappedPet = Date.now()
})
this.registerChat("&r&aYou summoned your &r${pet}&r&a!&r", (pet)=>{
this.petElement.setText("&6Pet&7> &7[Lvl " + this.petLevels[pet.replace("&", "§")] +"] "+pet)
this.petText = "&6Pet&7> &7[Lvl " + this.petLevels[pet.replace("&", "§")] +"] "+pet
+
+ this.lastSwappedPet = Date.now()
})
this.registerChat("&r&aYou despawned your &r${*}&r&a!&r", ()=>{
this.petElement.setText("&6Pet&7> &cNone")
this.petText = "&6Pet&7> &cNone"
+
+ this.lastSwappedPet = Date.now()
})
this.registerChat("&r&aYour &r${pet} &r&alevelled up to level &r&9${level}&r&a!&r", (pet, level)=>{
this.petElement.setText("&6Pet&7> &7[Lvl " + level +"] "+pet)
this.petText = "&6Pet&7> &7[Lvl " + level +"] "+pet
+
+ this.lastSwappedPet = Date.now()
})
this.registerSoopy("apiLoad", this.apiLoad)
if(this.FeatureManager.features["dataLoader"].class.lastApiData.skyblock){
this.apiLoad(this.FeatureManager.features["dataLoader"].class.lastApiData.skyblock, "skyblock", true, true)
+
+ this.lastSwappedPet = Date.now()
}
this.registerActionBar("${m}", this.actionbarMessage)
@@ -262,11 +275,20 @@ class Hud extends Feature {
if(inv[i]!=null && inv[i].getName().includes("[Lvl ")){
let level = inv[i].getName().split(" ")[1].replace("]", "")
if(!this.petLevels[inv[i].getName().split("] ")[1]] || this.petLevels[inv[i].getName().split("] ")[1]] < level)this.petLevels[inv[i].getName().split("] ")[1]] = level
+
+ if(Date.now()-this.lastSwappedPet > 1000){
+ inv[i].getLore().forEach(line => {
+ if(line.includes("Click to despawn.")){
+ this.petElement.setText("&6Pet&7> &7" + inv[i].getName().split("(")[0])
+ this.petText = "&6Pet&7> &7" + inv[i].getName().split("(")[0]
+ }
+ })
+ }
}
}
}
- if(Player.getPlayer().func_110139_bj() > this.lastAbsorbtion){
+ if(Player.getPlayer()[m.getAbsorptionAmount]() > this.lastAbsorbtion){
if(Date.now()-this.impactTest < 750){
this.lastWitherImpact = Date.now()
this.impactTest = 0
@@ -274,7 +296,7 @@ class Hud extends Feature {
this.aup = Date.now()
}
}
- this.lastAbsorbtion = Player.getPlayer().func_110139_bj()
+ this.lastAbsorbtion = Player.getPlayer()[m.getAbsorptionAmount]()
}
step_5second(){
diff --git a/features/mining/index.js b/features/mining/index.js
index 214ffa7..b89d8e6 100644
--- a/features/mining/index.js
+++ b/features/mining/index.js
@@ -1,6 +1,7 @@
/// <reference types="../../../CTAutocomplete" />
/// <reference lib="es2015" />
import Feature from "../../featureClass/class";
+import { m } from "../../mappings/mappings";
import * as stringUtils from "../../utils/stringUtils";
import * as utils from "../../utils/utils"
import HudTextElement from "../hud/HudTextElement";
@@ -76,13 +77,13 @@ class Mining extends Feature {
if(unlockedGems){
- if(unlockedGems.func_74745_c() === 0){
+ if(unlockedGems[m.tagCount]() === 0){
utils.addLore(item, ChatLib.addColor("&d&lGemstones Unlocked: &f"), ChatLib.addColor("&cNone!"))
}else{
let gemstoneString = ""
- for(let i = 0; i < unlockedGems.func_74745_c(); i++){
- let gem = String(unlockedGems.func_150307_f(i)).split("_")
+ for(let i = 0; i < unlockedGems[m.tagCount](); i++){
+ let gem = String(unlockedGems[m.getStringTagAt](i)).split("_")
let name = stringUtils.firstLetterCapital(gem[0].toLowerCase())
@@ -132,7 +133,7 @@ class Mining extends Feature {
if(this.FeatureManager.features["dataLoader"].class.area === "Crystal Hollows" && this.FeatureManager.features["dataLoader"].class.areaFine === "Khazad-dm"){
this.balEntity = undefined
- World.getAllEntities().filter(a=>a.getName()==="Magma Cube").filter(a=>a.getEntity().func_70809_q() > 10).forEach((bal)=>{
+ World.getAllEntities().filter(a=>a.getName()==="Magma Cube").filter(a=>a.getEntity()[m.getSlimeSize]() > 10).forEach((bal)=>{
//Bal found
this.balEntity = bal
})
diff --git a/features/settings/settingsCommunicator.js b/features/settings/settingsCommunicator.js
index b54b1c1..d0a55fc 100644
--- a/features/settings/settingsCommunicator.js
+++ b/features/settings/settingsCommunicator.js
@@ -24,6 +24,6 @@ class SettingsCommunicator {
}
}
-const settingsCommunicator = new SettingsCommunicator()
+if(!global.soopyv2SettingsCommunicator) global.soopyv2SettingsCommunicator = new SettingsCommunicator()
-export default settingsCommunicator \ No newline at end of file
+export default global.soopyv2SettingsCommunicator \ No newline at end of file
diff --git a/features/slayers/index.js b/features/slayers/index.js
index 3c3b517..0be4e57 100644
--- a/features/slayers/index.js
+++ b/features/slayers/index.js
@@ -1,6 +1,7 @@
/// <reference types="../../../CTAutocomplete" />
/// <reference lib="es2015" />
import Feature from "../../featureClass/class";
+import { f, m } from "../../mappings/mappings";
import { numberWithCommas } from "../../utils/numberUtils";
import { drawBoxAtBlock, drawBoxAtEntity, drawFilledBox, drawLine } from "../../utils/renderUtils";
import HudTextElement from "../hud/HudTextElement";
@@ -107,7 +108,7 @@ class Slayers extends Feature {
World.getAllEntitiesOfType(net.minecraft.entity.item.EntityArmorStand).forEach(e=>{
if(e.getName().includes("Voidgloom Seraph")){
//if distance from e to event.entity < 5
- if((e.getX() - event.entity.field_70165_t)**2 + (e.getY() - event.entity.field_70163_u)**2 + (e.getZ() - event.entity.field_70161_v)**2 < 25){
+ if((e.getX() - event.entity[f.posX.Entity])**2 + (e.getY() - event.entity[f.posY.Entity])**2 + (e.getZ() - event.entity[f.posZ.Entity])**2 < 25){
this.emanBoss = e
}
}
@@ -205,15 +206,15 @@ class Slayers extends Feature {
this.todoE.forEach(e=>{
try{
- if(e instanceof net.minecraft.entity.item.EntityArmorStand && e.func_71124_b(4)){
- if(e.func_71124_b(4).func_82833_r() === "Beacon"){
+ if(e instanceof net.minecraft.entity.item.EntityArmorStand && e[m.getEquipmentInSlot](4)){
+ if(e[m.getEquipmentInSlot](4)[m.getDisplayName.ItemStack]() === "Beacon"){
let closestEIsGaming = false
let closestDist = Infinity
World.getAllEntitiesOfType(net.minecraft.entity.item.EntityArmorStand).forEach(e2=>{
if(e2.getName().includes("Voidgloom Seraph")){
- if((e2.getX() - e.field_70165_t)**2 + (e2.getY() - e.field_70163_u)**2 + (e2.getZ() - e.field_70161_v)**2 < closestDist){
- closestDist = (e2.getX() - e.field_70165_t)**2 + (e2.getY() - e.field_70163_u)**2 + (e2.getZ() - e.field_70161_v)**2
+ if((e2.getX() - e[f.posX.Entity])**2 + (e2.getY() - e[f.posY.Entity])**2 + (e2.getZ() - e[f.posZ.Entity])**2 < closestDist){
+ closestDist = (e2.getX() - e[f.posX.Entity])**2 + (e2.getY() - e[f.posY.Entity])**2 + (e2.getZ() - e[f.posZ.Entity])**2
closestEIsGaming = this.emanBoss?e2.getUUID().toString()===this.emanBoss.getUUID().toString():false
}
}
@@ -222,27 +223,27 @@ class Slayers extends Feature {
this.beaconE.push(e)
}
}
- if(e.func_71124_b(4).func_82833_r().startsWith("§a")){
+ if(e[m.getEquipmentInSlot](4)[m.getDisplayName.ItemStack]().startsWith("§a")){
let closestEIsGaming = false
let closestDist = Infinity
World.getAllEntitiesOfType(net.minecraft.entity.item.EntityArmorStand).forEach(e2=>{
if(e2.getName().includes("Voidgloom Seraph")){
- if((e2.getX() - e.field_70165_t)**2 + (e2.getY() - e.field_70163_u)**2 + (e2.getZ() - e.field_70161_v)**2 < closestDist){
- closestDist = (e2.getX() - e.field_70165_t)**2 + (e2.getY() - e.field_70163_u)**2 + (e2.getZ() - e.field_70161_v)**2
+ if((e2.getX() - e[f.posX.Entity])**2 + (e2.getY() - e[f.posY.Entity])**2 + (e2.getZ() - e[f.posZ.Entity])**2 < closestDist){
+ closestDist = (e2.getX() - e[f.posX.Entity])**2 + (e2.getY() - e[f.posY.Entity])**2 + (e2.getZ() - e[f.posZ.Entity])**2
closestEIsGaming = this.emanBoss?e2.getUUID().toString()===this.emanBoss.getUUID().toString():false
}
}
})
- if(closestEIsGaming && new Item(e.func_71124_b(4)).getNBT().getCompoundTag("tag").getCompoundTag("SkullOwner").getCompoundTag("Properties").getRawNBT().func_150295_c("textures", 10).func_150305_b(0).func_74779_i("Value") === "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0="){
+ if(closestEIsGaming && new Item(e[m.getEquipmentInSlot](4)).getNBT().getCompoundTag("tag").getCompoundTag("SkullOwner").getCompoundTag("Properties").getRawNBT()[m.getTagList]("textures", 10)[m.getCompoundTagAt](0)[m.getString.NBTTagCompound]("Value") === "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0="){
this.eyeE.push(new Entity(e))
}
- // console.log(":" + new Item(e.func_71124_b(4)).getNBT().getCompoundTag("tag").getCompoundTag("SkullOwner").getCompoundTag("Properties").getRawNBT().func_150295_c("textures", 10).func_150305_b(0).func_74779_i("Value"))
+ // console.log(":" + new Item(e[m.getEquipmentInSlot](4)).getNBT().getCompoundTag("tag").getCompoundTag("SkullOwner").getCompoundTag("Properties").getRawNBT().func_150295_c("textures", 10).func_150305_b(0).func_74779_i("Value"))
}
}
- if(e.func_95999_t() && e.func_95999_t().includes("Voidgloom Seraph")){
+ if(e[m.getCustomNameTag]() && e[m.getCustomNameTag]().includes("Voidgloom Seraph")){
if(Date.now()-this.nextIsBoss < 3000){
this.emanBoss = new Entity(e)
this.nextIsBoss = false
@@ -253,25 +254,25 @@ class Slayers extends Feature {
this.todoE = this.todoE2
this.todoE2 = []
- if(this.emanBoss && this.emanBoss.getEntity().field_70128_L) this.emanBoss = undefined
- this.eyeE = this.eyeE.filter(e=>!e.getEntity().field_70128_L)
+ if(this.emanBoss && this.emanBoss.getEntity()[f.isDead]) this.emanBoss = undefined
+ this.eyeE = this.eyeE.filter(e=>!e.getEntity()[f.isDead])
this.beaconE = this.beaconE.filter((e)=>{
- if(e.field_70128_L){
- this.deadE.push([Date.now(), e.func_110124_au().toString()])
+ if(e[f.isDead]){
+ this.deadE.push([Date.now(), e[m.getUniqueID.Entity]().toString()])
- let pos = [e.field_70165_t+0.5, e.field_70163_u+0.7, e.field_70161_v+0.5]
+ 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.func_110124_au().toString()] = [Math.floor(x), Math.floor(y), Math.floor(z)]
+ this.beaconLocations[e[m.getUniqueID.Entity]().toString()] = [Math.floor(x), Math.floor(y), Math.floor(z)]
}
}
}
}
- // if(!this.beaconLocations[e.func_110124_au().toString()]){
+ // if(!this.beaconLocations[e[m.getUniqueID.Entity]().toString()]){
// console.log("Diddnt find beacon wtf?????")
// }
@@ -281,9 +282,9 @@ class Slayers extends Feature {
})
this.beaconE.forEach((e)=>{
- if(!this.beaconPoints[e.func_110124_au().toString()])this.beaconPoints[e.func_110124_au().toString()] = []
+ if(!this.beaconPoints[e[m.getUniqueID.Entity]().toString()])this.beaconPoints[e[m.getUniqueID.Entity]().toString()] = []
- this.beaconPoints[e.func_110124_au().toString()].push([e.field_70165_t+0.5, e.field_70163_u+0.7, e.field_70161_v+0.5])//x, y, z
+ this.beaconPoints[e[m.getUniqueID.Entity]().toString()].push([e[f.posX.Entity]+0.5, e[f.posY.Entity]+0.7, e[f.posZ.Entity]+0.5])//x, y, z
})
this.deadE = this.deadE.filter(e=>{
diff --git a/features/streamsGUI/index.js b/features/streamsGUI/index.js
index f452806..366fbcd 100644
--- a/features/streamsGUI/index.js
+++ b/features/streamsGUI/index.js
@@ -10,6 +10,7 @@ import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement";
import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent";
import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow";
import BoxWithText from "../../../guimanager/GuiElement/BoxWithText";
+import { drawBoxAtBlock } from "../../utils/renderUtils";
class StreamsGui extends Feature {
constructor() {
@@ -20,6 +21,7 @@ class StreamsGui extends Feature {
this.initVariables()
this.GuiPage = new StreamPage()
+
}
initVariables(){