Código:
Summary
this.RedC = (Value<Float>)new NumericValue<Float>(this, "Red Color", 1.0F, 1.0F, 255.0F);
this.GreenC = (Value<Float>)new NumericValue<Float>(this, "Green Color", 1.0F, 1.0F, 255.0F);
this.BlueC = (Value<Float>)new NumericValue<Float>(this, "Blue Color", 1.0F, 1.0F, 255.0F);
this.AlphaC = (Value<Float>)new NumericValue<Float>(this, "Alpha Color", 1.0F, 1.0F, 255.0F);
private void drawNames(EntityPlayer player) {
float xP = 2.2f;
float width = ((getWidth(getPlayerName(player))) / 2F) + xP;
float w = width ;
float nw = -width - xP;
float offset = (getWidth(getPlayerName(player))) + (4) ;
float ColorRED = (float) this.RedC.getValue();
float ColorBLUE = (float) this.GreenC.getValue();
float ColorGREEN = (float) this.BlueC.getValue();
if ((Boolean)this.BorderColor.getValue()) {
drawBorderedRect(nw, -3, width, 10, 0xA0001111, 0);
} else {
if ((Boolean)this.Color.getValue()) {
drawRect(nw, -3, width, 10, new Color(Float.valueOf(ColorRED), Float.valueOf(ColorBLUE), Float.valueOf(ColorGREEN)).getRGB());
} else {
drawRect(nw, -3, width, 10, 0xA0001111);
}
}
GlStateManager.disableDepth();
drawString(getPlayerName(player) , (int) (w - offset) , 0, 0xFFFFFF);
GlStateManager.enableDepth();
}
Erro:
Summary
java.lang.IllegalArgumentException: Color parameter outside of expected range: Red Green Blue
at java.awt.Color.testColorValueRange(Unknown Source)
at java.awt.Color.(Unknown Source)
at java.awt.Color.(Unknown Source)
at java.awt.Color.(Unknown Source)
at me.Atlas.client.module.list.render.NameTags.drawNames(NameTags.java:165)
at me.Atlas.client.module.list.render.NameTags.renderNametag(NameTags.java:553)
at me.Atlas.client.module.list.render.NameTags.lambda$0(NameTags.java:105)
at java.util.ArrayList.forEach(Unknown Source)
at me.Atlas.client.module.list.render.NameTags.onEvent(NameTags.java:101)
at me.Atlas.client.events.EventManager.hook(EventManager.java:17)
at net.minecraft.src.EntityRenderer.renderWorld(EntityRenderer.java:1714)
at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1095)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:765)
at net.minecraft.client.Minecraft.run(Minecraft.java:656)
at java.lang.Thread.run(Unknown Source)
2018-05-02 18:04:59 [CLIENT] [INFO] Stopping!
Atlas was shutdowned with sucess.