aboutsummaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-11-11 15:30:20 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-11-11 15:30:20 +0800
commit9e7bedbd8bedd5599a756cce9cad76754f9a2e74 (patch)
treee78d23b5e52859c029118d647511345a8fb0d1e2 /features
parentcd85af68f5af559d869097306cf063a628b19f6f (diff)
downloadSoopyV2-9e7bedbd8bedd5599a756cce9cad76754f9a2e74.tar.gz
SoopyV2-9e7bedbd8bedd5599a756cce9cad76754f9a2e74.tar.bz2
SoopyV2-9e7bedbd8bedd5599a756cce9cad76754f9a2e74.zip
Fixes to many things
Diffstat (limited to 'features')
-rw-r--r--features/cosmetics/dragonWings.js32
-rw-r--r--features/cosmetics/index.js22
-rw-r--r--features/globalSettings/firstLoadPages.js2
-rw-r--r--features/globalSettings/index.js13
-rw-r--r--features/settings/settingThings/textSetting.js2
5 files changed, 54 insertions, 17 deletions
diff --git a/features/cosmetics/dragonWings.js b/features/cosmetics/dragonWings.js
index d9e8a1c..d523a46 100644
--- a/features/cosmetics/dragonWings.js
+++ b/features/cosmetics/dragonWings.js
@@ -4,6 +4,8 @@ const ModelDragon = Java.type("net.minecraft.client.model.ModelDragon")
const ResourceLocation = Java.type("net.minecraft.util.ResourceLocation")
const GlStateManager = Java.type("net.minecraft.client.renderer.GlStateManager");
+const Essential = Java.type("gg.essential.Essential")
+const EssentialCosmeticSlot = Java.type("gg.essential.cosmetics.CosmeticSlot")
const FACING = Java.type("net.minecraft.block.BlockDirectional").field_176387_N
let dragon = new ModelDragon(0) //too lazy to make my own model so i just yoink it from modelDragon lmfao
@@ -24,10 +26,6 @@ class DragonWings extends Cosmetic {
}
onRender(ticks){
- if(this.settings.disableWithNoChestplate && this.player.getPlayer().func_82169_q(2) === null && !(this.player === Player && Client.getMinecraft().field_71474_y.field_74320_O === 0)){
- return
- }
-
if(this.player.getPlayer().func_98034_c(Player.getPlayer())){
return
}
@@ -157,7 +155,7 @@ class DragonWings extends Cosmetic {
let dist = Math.sqrt((Player.getX()-this.player.getX())**2+(Player.getY()-this.player.getY())**2+(Player.getZ()-this.player.getZ())**2)+1
- World.playSound("mob.enderdragon.wings", (this.settings.scale*15)*Math.min(1, 50/(dist*dist)), 1)
+ World.playSound("mob.enderdragon.wings", (Math.max(0.005,this.settings.scale-0.005)*25)*Math.min(1, 50/Math.min(1,dist*dist))/50, 1-(Math.max(0.005,this.settings.scale-0.005)*25))
this.lastFlapSound = 2*Math.PI+(this.animOffset)-this.animOffset%(Math.PI*2)
}
this.animOffset += 2*timeSince*Math.min(1,(amt/(1*Math.PI))*2)
@@ -261,20 +259,34 @@ class DragonWings extends Cosmetic {
wingTip.field_78808_h = -((Math.sin((this.animOffset))*0.5 + 0.3))
}
-
Tessellator.translate(0.1, 0, 0)
- wing.func_78791_b(this.settings.scale) //render left wing
+ Tessellator.scale(this.settings.scale, this.settings.scale, this.settings.scale)
+ wing.func_78791_b(1) //render left wing
- Tessellator.translate(-0.2, 0, 0)
+ Tessellator.translate(-0.2/this.settings.scale, 0, 0)
Tessellator.scale(-1, 1, 1)
- wing.func_78791_b(this.settings.scale) //render right wing
+ wing.func_78791_b(1) //render right wing
GlStateManager.func_179121_F(); // popMatrix
}
onTick(){
- // this.scale += 0.001
+ if(!this.player.getPlayer().getEssentialCosmetics()) return
+
+ let wingCosmetic = this.player.getPlayer().getEssentialCosmetics().get(EssentialCosmeticSlot.WINGS)
+ if(wingCosmetic !== null){
+ this.player.getPlayer().getEssentialCosmeticModels().get(Essential.instance.getConnectionManager().getCosmeticsManager().getCosmetic(wingCosmetic)).getModel().getModel().boneList.forEach(b=>{
+ b.isHidden = true
+ })
+ }else{
+ let fullBodyCosmetic = this.player.getPlayer().getEssentialCosmetics().get(EssentialCosmeticSlot.FULL_BODY)
+ if(fullBodyCosmetic === "DRAGON_ONESIE_2"){
+ this.player.getPlayer().getEssentialCosmeticModels().get(Essential.instance.getConnectionManager().getCosmeticsManager().getCosmetic(fullBodyCosmetic)).getModel().getModel().boneList.forEach(b=>{
+ if(b.boxName === "wing_left_1" || b.boxName === "wing_right_1")b.isHidden = true
+ })
+ }
+ }
}
}
diff --git a/features/cosmetics/index.js b/features/cosmetics/index.js
index 11d9f47..c2bd10d 100644
--- a/features/cosmetics/index.js
+++ b/features/cosmetics/index.js
@@ -3,6 +3,8 @@
import Feature from "../../featureClass/class";
import DragonWings from "./dragonWings"
import Toggle from "../settings/settingThings/toggle"
+const Essential = Java.type("gg.essential.Essential")
+const EssentialCosmeticSlot = Java.type("gg.essential.cosmetics.CosmeticSlot")
class Cosmetics extends Feature {
constructor() {
@@ -34,6 +36,8 @@ class Cosmetics extends Feature {
this.registerStep(false, 60*10, ()=>{
new Thread(()=>{this.loadCosmeticsData.call(this)}).start()
})
+
+
}
loadCosmeticsData(){
@@ -126,6 +130,24 @@ class Cosmetics extends Feature {
}
tick(){
+ World.getAllPlayers().forEach(p=>{
+ if(!p.getPlayer().getEssentialCosmetics()) return
+
+ let wingCosmetic = p.getPlayer().getEssentialCosmetics().get(EssentialCosmeticSlot.WINGS)
+ if(wingCosmetic !== null){
+ p.getPlayer().getEssentialCosmeticModels().get(Essential.instance.getConnectionManager().getCosmeticsManager().getCosmetic(wingCosmetic)).getModel().getModel().boneList.forEach(b=>{
+ b.isHidden = false
+ })
+ }else{
+ let fullBodyCosmetic = p.getPlayer().getEssentialCosmetics().get(EssentialCosmeticSlot.FULL_BODY)
+ if(fullBodyCosmetic === "DRAGON_ONESIE_2"){
+ p.getPlayer().getEssentialCosmeticModels().get(Essential.instance.getConnectionManager().getCosmeticsManager().getCosmetic(fullBodyCosmetic)).getModel().getModel().boneList.forEach(b=>{
+ if(b.boxName === "wing_left_1" || b.boxName === "wing_right_1")b.isHidden = false
+ })
+ }
+ }
+ })
+
this.filterUnloadedCosmetics(true)
}
diff --git a/features/globalSettings/firstLoadPages.js b/features/globalSettings/firstLoadPages.js
index e395afe..eebd5be 100644
--- a/features/globalSettings/firstLoadPages.js
+++ b/features/globalSettings/firstLoadPages.js
@@ -68,7 +68,7 @@ class HowToOpenMenuPage extends FirstLoadPage{
this.addChild(new SoopyTextElement().setText("§0Your all set!").setLocation(0.1, 0.1,0.8,0.3).setMaxTextScale(10));
- this.addChild(new SoopyTextElement().setText("§7To change any settings, or to access this menu again run §2/soopyaddons§7.").setLocation(0.1, 0.3,0.8,0.1).setMaxTextScale(10));
+ this.addChild(new SoopyTextElement().setText("§7To change any settings, or to access this menu again run §2/soopyv2§7.").setLocation(0.1, 0.3,0.8,0.1).setMaxTextScale(10));
let openSettingsButton = new ButtonWithArrow().setText("§0Open settings").setLocation(0.1, 0.5,0.3,0.2).setDirectionRight(false)
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js
index 18a70a3..dd3d922 100644
--- a/features/globalSettings/index.js
+++ b/features/globalSettings/index.js
@@ -40,14 +40,14 @@ class Hud extends Feature {
this.privacySettings = [this.reportErrorsSetting, this.sendChatSetting]
- this.GuiPage = new FirstLoadingPage(this)
+ // this.GuiPage = new FirstLoadingPage(this)
this.registerChat("&aYour new API key is &r&b${key}&r", this.newKey)
- new Thread(()=>{
- Thread.sleep(1000) //TODO: DO ON WORLDLOAD
- ChatLib.command("soopyv2 first_load_thing", true)//TODO: ONLY RUN ON FIRST INSTALL
- }).start()
+ // new Thread(()=>{
+ // Thread.sleep(1000) //TODO: DO ON WORLDLOAD
+ // ChatLib.command("soopyv2 first_load_thing", true)//TODO: ONLY RUN ON FIRST INSTALL
+ // }).start()
}
findKey(){
@@ -149,6 +149,9 @@ class Hud extends Feature {
}
}
}catch(_){}
+
+
+ new Notification("§cUnable to find api key", [])
}).start()
}
diff --git a/features/settings/settingThings/textSetting.js b/features/settings/settingThings/textSetting.js
index 4960461..4666fbf 100644
--- a/features/settings/settingThings/textSetting.js
+++ b/features/settings/settingThings/textSetting.js
@@ -15,7 +15,7 @@ class TextSetting extends SettingBase {
this.guiObject.text.setLocation(0, 0, 0.6, 0.6)
this.guiObject.description.setLocation(0, 0.6, 0.55, 0.4)
- this.textObject.addEvent(new SoopyContentChangeEvent().setHandler((newVal, oldVal, resetFun)=>{
+ this.textObject.text.addEvent(new SoopyContentChangeEvent().setHandler((newVal, oldVal, resetFun)=>{
this.setValue(newVal)
}))