ez music
This commit is contained in:
parent
fd24371748
commit
b66ca91aae
BIN
desktopRuntime/resources/assets/eagler/gui/ava.ogg
Normal file
BIN
desktopRuntime/resources/assets/eagler/gui/ava.ogg
Normal file
Binary file not shown.
|
@ -1888,6 +1888,15 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"music.res": {
|
||||
"category": "music",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "music/res/ava",
|
||||
"stream": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"music.game": {
|
||||
"category": "music",
|
||||
"sounds": [
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
56716
javascript/classes.js
56716
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -6,6 +6,11 @@ import dev.resent.module.base.ModManager;
|
|||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
import dev.resent.module.setting.ModeSetting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.MusicTicker;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.audio.SoundHandler;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class Resent {
|
||||
|
||||
|
@ -80,14 +85,20 @@ public class Resent {
|
|||
|
||||
//Legacy code below.
|
||||
|
||||
//private ISound uwu;
|
||||
|
||||
/*public void playMusic(ResourceLocation loc){
|
||||
this.uwu = PositionedSoundRecord.create(loc);
|
||||
if(uwu != null){
|
||||
Minecraft.getMinecraft().getSoundHandler().stopSounds();
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(uwu);
|
||||
}
|
||||
/*public void playMusic(){
|
||||
MusicTicker player = Minecraft.getMinecraft().func_181535_r();
|
||||
SoundHandler soundhandler = Minecraft.getMinecraft().getSoundHandler();
|
||||
player.func_181557_a();
|
||||
player.func_181558_a(MusicTicker.MusicType.RES);
|
||||
soundhandler.resumeSounds();
|
||||
}*/
|
||||
|
||||
public void test(){
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation("minecraft:music.res"), 1));
|
||||
}
|
||||
|
||||
public void stopMusic(){
|
||||
Minecraft.getMinecraft().getSoundHandler().stopSounds();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.Resent;
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
|
||||
@Module(name = "FullBright", category = Category.MISC)
|
||||
public class Fullbright extends Mod {
|
||||
|
@ -10,6 +11,8 @@ public class Fullbright extends Mod {
|
|||
@Override
|
||||
public void onEnable() {
|
||||
if (mc.thePlayer != null && mc.theWorld != null && mc.gameSettings != null) {
|
||||
//Resent.INSTANCE.playMusic();
|
||||
Resent.INSTANCE.test();
|
||||
mc.gameSettings.gammaSetting = 100;
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +20,7 @@ public class Fullbright extends Mod {
|
|||
@Override
|
||||
public void onDisable() {
|
||||
if (mc.thePlayer != null && mc.theWorld != null && mc.gameSettings != null) {
|
||||
Resent.INSTANCE.stopMusic();
|
||||
mc.gameSettings.gammaSetting = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "NoHurtCam", category = Category.MISC)
|
||||
public class NoHurtCam extends Mod { }
|
89
src/main/java/dev/resent/util/render/RoundedUtil.java
Normal file
89
src/main/java/dev/resent/util/render/RoundedUtil.java
Normal file
|
@ -0,0 +1,89 @@
|
|||
/*package dev.resent.util.render;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
|
||||
public class RoundedUtil {
|
||||
final static Minecraft mc = Minecraft.getMinecraft();
|
||||
final static FontRenderer fr = mc.fontRendererObj;
|
||||
|
||||
|
||||
public static void drawSmoothRoundedRect(float x, float y, float x1, float y1, float radius, int color) {
|
||||
glPushAttrib(0);
|
||||
glScaled(0.5D, 0.5D, 0.5D);
|
||||
x *= 2.0D;
|
||||
y *= 2.0D;
|
||||
x1 *= 2.0D;
|
||||
y1 *= 2.0D;
|
||||
glEnable(RealOpenGLEnums.GL_BLEND);
|
||||
glDisable(RealOpenGLEnums.GL_TEXTURE_2D);
|
||||
glEnable(RealOpenGLEnums.GL_LINE_SMOOTH);
|
||||
setColor(color);
|
||||
glEnable(RealOpenGLEnums.GL_LINE_SMOOTH);
|
||||
glBegin(RealOpenGLEnums.GL_POLYGON);
|
||||
int i;
|
||||
for (i = 0; i <= 90; i += 3)
|
||||
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y + radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
||||
for (i = 90; i <= 180; i += 3)
|
||||
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
||||
for (i = 0; i <= 90; i += 3)
|
||||
glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
||||
for (i = 90; i <= 180; i += 3)
|
||||
glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y + radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
||||
glEnd();
|
||||
glBegin(RealOpenGLEnums.GL_LINE_LOOP);
|
||||
for (i = 0; i <= 90; i += 3)
|
||||
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y + radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
||||
for (i = 90; i <= 180; i += 3)
|
||||
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
||||
for (i = 0; i <= 90; i += 3)
|
||||
glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
||||
for (i = 90; i <= 180; i += 3)
|
||||
glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y + radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
||||
glEnd();
|
||||
glEnable(RealOpenGLEnums.GL_TEXTURE_2D);
|
||||
glDisable(RealOpenGLEnums.GL_BLEND);
|
||||
glDisable(RealOpenGLEnums.GL_LINE_SMOOTH);
|
||||
glDisable(RealOpenGLEnums.GL_LINE_SMOOTH);
|
||||
glEnable(RealOpenGLEnums.GL_TEXTURE_2D);
|
||||
glScaled(2.0D, 2.0D, 2.0D);
|
||||
glPopAttrib();
|
||||
glLineWidth(1);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
public static void drawRoundedRect(float x, float y, float x1, float y1, float radius, int color) {
|
||||
glPushAttrib(0);
|
||||
glScaled(0.5D, 0.5D, 0.5D);
|
||||
x *= 2.0D;
|
||||
y *= 2.0D;
|
||||
x1 *= 2.0D;
|
||||
y1 *= 2.0D;
|
||||
glEnable(RealOpenGLEnums.GL_BLEND);
|
||||
glDisable(RealOpenGLEnums.GL_TEXTURE_2D);
|
||||
glEnable(RealOpenGLEnums.GL_LINE_SMOOTH);
|
||||
setColor(color);
|
||||
glEnable(RealOpenGLEnums.GL_LINE_SMOOTH);
|
||||
glBegin(RealOpenGLEnums.GL_POLYGON);
|
||||
int i;
|
||||
for (i = 0; i <= 90; i += 3)
|
||||
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y + radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
||||
for (i = 90; i <= 180; i += 3)
|
||||
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
||||
for (i = 0; i <= 90; i += 3)
|
||||
glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
||||
for (i = 90; i <= 180; i += 3)
|
||||
glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y + radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
||||
glEnd();
|
||||
glEnable(RealOpenGLEnums.GL_TEXTURE_2D);
|
||||
glDisable(RealOpenGLEnums.GL_BLEND);
|
||||
glDisable(RealOpenGLEnums.GL_LINE_SMOOTH);
|
||||
glDisable(RealOpenGLEnums.GL_BLEND);
|
||||
glDisable(RealOpenGLEnums.GL_LINE_SMOOTH);
|
||||
glScaled(2.0D, 2.0D, 2.0D);
|
||||
glEnable(RealOpenGLEnums.GL_BLEND);
|
||||
glPopAttrib();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
}*/
|
|
@ -72,6 +72,7 @@ public class MusicTicker implements ITickable {
|
|||
}
|
||||
|
||||
public static enum MusicType {
|
||||
RES(new ResourceLocation("minecraft:music.res"), 0,0),
|
||||
MENU(new ResourceLocation("minecraft:music.menu"), 20, 600),
|
||||
GAME(new ResourceLocation("minecraft:music.game"), 12000, 24000),
|
||||
CREATIVE(new ResourceLocation("minecraft:music.game.creative"), 1200, 3600),
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
*=
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user