mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 19:58:34 +01:00
made the extended bar only show if levels are high or low enough
This commit is contained in:
parent
fb42cfab09
commit
7ee06acffa
2 changed files with 13 additions and 12 deletions
|
@ -246,7 +246,7 @@ public class ClientEvents {
|
||||||
float totalPercentage = totalAmount / (IAuraChunk.DEFAULT_AURA * 2F);
|
float totalPercentage = totalAmount / (IAuraChunk.DEFAULT_AURA * 2F);
|
||||||
|
|
||||||
int tHeight = MathHelper.ceil(MathHelper.clamp(totalPercentage, 0F, 1F) * 50);
|
int tHeight = MathHelper.ceil(MathHelper.clamp(totalPercentage, 0F, 1F) * 50);
|
||||||
int y = eyeImproved.isEmpty() ? 10 : 36;
|
int y = !eyeImproved.isEmpty() && totalPercentage > 1F ? 36 : 10;
|
||||||
if (tHeight < 50)
|
if (tHeight < 50)
|
||||||
Gui.drawModalRectWithCustomSizedTexture(3, y, 6, 12, 6, 50 - tHeight, 256, 256);
|
Gui.drawModalRectWithCustomSizedTexture(3, y, 6, 12, 6, 50 - tHeight, 256, 256);
|
||||||
if (tHeight > 0)
|
if (tHeight > 0)
|
||||||
|
@ -256,23 +256,24 @@ public class ClientEvents {
|
||||||
GlStateManager.color(160 / 255F, 83 / 255F, 8 / 255F);
|
GlStateManager.color(160 / 255F, 83 / 255F, 8 / 255F);
|
||||||
|
|
||||||
int topHeight = MathHelper.ceil(MathHelper.clamp((totalPercentage - 1F) * 2F, 0F, 1F) * 25);
|
int topHeight = MathHelper.ceil(MathHelper.clamp((totalPercentage - 1F) * 2F, 0F, 1F) * 25);
|
||||||
|
if (topHeight > 0) {
|
||||||
if (topHeight < 25)
|
if (topHeight < 25)
|
||||||
Gui.drawModalRectWithCustomSizedTexture(3, 10, 18, 12, 6, 25 - topHeight, 256, 256);
|
Gui.drawModalRectWithCustomSizedTexture(3, 10, 18, 12, 6, 25 - topHeight, 256, 256);
|
||||||
if (topHeight > 0)
|
|
||||||
Gui.drawModalRectWithCustomSizedTexture(3, 10 + 25 - topHeight, 12, 12 + 25 - topHeight, 6, topHeight, 256, 256);
|
Gui.drawModalRectWithCustomSizedTexture(3, 10 + 25 - topHeight, 12, 12 + 25 - topHeight, 6, topHeight, 256, 256);
|
||||||
|
}
|
||||||
int bottomHeight = MathHelper.ceil(MathHelper.clamp((totalPercentage + 1F) * 2F - 1F, 0F, 1F) * 25);
|
int bottomHeight = MathHelper.ceil(MathHelper.clamp((totalPercentage + 1F) * 2F - 1F, 0F, 1F) * 25);
|
||||||
if (bottomHeight < 25)
|
if (bottomHeight < 25) {
|
||||||
Gui.drawModalRectWithCustomSizedTexture(3, 87, 18, 12, 6, 25 - bottomHeight, 256, 256);
|
Gui.drawModalRectWithCustomSizedTexture(3, 61, 18, 12, 6, 25 - bottomHeight, 256, 256);
|
||||||
if (bottomHeight > 0)
|
if (bottomHeight > 0)
|
||||||
Gui.drawModalRectWithCustomSizedTexture(3, 87 + 25 - bottomHeight, 12, 12 + 25 - bottomHeight, 6, bottomHeight, 256, 256);
|
Gui.drawModalRectWithCustomSizedTexture(3, 61 + 25 - bottomHeight, 12, 12 + 25 - bottomHeight, 6, bottomHeight, 256, 256);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int color = eyeImproved.isEmpty() ? 0x53a008 : 0xa05308;
|
int color = eyeImproved.isEmpty() ? 0x53a008 : 0xa05308;
|
||||||
if (totalPercentage > (eyeImproved.isEmpty() ? 1F : 1.5F))
|
if (totalPercentage > (eyeImproved.isEmpty() ? 1F : 1.5F))
|
||||||
mc.fontRenderer.drawString("+", 10F, 9.5F, color, true);
|
mc.fontRenderer.drawString("+", 10F, 9.5F, color, true);
|
||||||
if (totalPercentage < (eyeImproved.isEmpty() ? 0F : -0.5F))
|
if (totalPercentage < (eyeImproved.isEmpty() ? 0F : -0.5F))
|
||||||
mc.fontRenderer.drawString("-", 10F, eyeImproved.isEmpty() ? 53.5F : 105.5F, color, true);
|
mc.fontRenderer.drawString("-", 10F, eyeImproved.isEmpty() ? 53.5F : 79.5F, color, true);
|
||||||
|
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
float scale = 0.75F;
|
float scale = 0.75F;
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"pages": [
|
"pages": [
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"text": "The $(l:items/eye)Environmental Eye$() is very useful in theory; however, a lot of magical botanists struggle with its limited range of gauging $(aura) in the environment around them. A simple solution to this probem is the $(item)Environmental Ocular$().$(br)While working similarly to the $(item)Environmental Eye$(), the main difference is its much bigger gauge for $(aura) in the area: It is $(thing)twice as large$()."
|
"text": "The $(l:items/eye)Environmental Eye$() is very useful in theory; however, a lot of magical botanists struggle with its limited range of gauging $(aura) in the environment around them. A simple solution to this problem is the $(item)Environmental Ocular$().$(br)While working similarly to the $(item)Environmental Eye$(), the main difference is its much bigger gauge for $(aura) in the area: It is $(thing)twice as large$()."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"text": "An additional perk is that, while the $(item)Environmental Eye$() needs to be held in the hotbar, the $(item)Environmental Ocular$() can be anywhere in the user's inventory to work.$(p)It should be noted that all of the features of the $(item)Environmental Eye$() that were not mentioned also carry over to the $(item)Environmental Ocular$()."
|
"text": "It needs be noted that the extended bar only shows if $(aura) levels are high or low enough.$(br)An additional perk is that, while the $(item)Environmental Eye$() needs to be held in the hotbar, the $(item)Environmental Ocular$() can be anywhere in the user's inventory to work.$(p)All other properties of the $(item)Environmental Eye$() carry over to the $(item)Environmental Ocular$() as expected."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "naturesaura:tree_ritual",
|
"type": "naturesaura:tree_ritual",
|
||||||
|
|
Loading…
Reference in a new issue