a
This commit is contained in:
parent
851bc61255
commit
1386e7eb0f
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
26876
javascript/classes.js
26876
javascript/classes.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -15,8 +15,7 @@ import net.minecraft.util.ResourceLocation;
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
public class PotionHUD extends RenderModule{
|
public class PotionHUD extends RenderModule{
|
||||||
|
|
||||||
protected float zLevelFloat;
|
int i2 = 16;
|
||||||
|
|
||||||
|
|
||||||
public PotionHUD() {
|
public PotionHUD() {
|
||||||
super("PotionHUD", Category.HUD, 4, 350);
|
super("PotionHUD", Category.HUD, 4, 350);
|
||||||
|
@ -27,41 +26,39 @@ public class PotionHUD extends RenderModule{
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
return 90;
|
return i2+10;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw() {
|
public void draw() {
|
||||||
int offsetX = 21;
|
|
||||||
int offsetY = 14;
|
|
||||||
int i = 80;
|
|
||||||
int i2 = 16;
|
|
||||||
Collection<PotionEffect> collection = mc.thePlayer.getActivePotionEffects();
|
Collection<PotionEffect> collection = mc.thePlayer.getActivePotionEffects();
|
||||||
if (!collection.isEmpty()) {
|
if (!collection.isEmpty()) {
|
||||||
int l = 33;
|
int l = 33;
|
||||||
if (collection.size() > 5)
|
if (collection.size() > 5)
|
||||||
l = 132 / (collection.size() - 1);
|
l = 132 / (collection.size() - 1);
|
||||||
for (PotionEffect potioneffect : mc.thePlayer.getActivePotionEffects()) {
|
for (PotionEffect potioneffect : mc.thePlayer.getActivePotionEffects()) {
|
||||||
|
|
||||||
Potion potion = Potion.potionTypes[potioneffect.getPotionID()];
|
Potion potion = Potion.potionTypes[potioneffect.getPotionID()];
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
GlStateManager.disableLighting();
|
GlStateManager.disableLighting();
|
||||||
GlStateManager.enableAlpha();
|
GlStateManager.enableAlpha();
|
||||||
if (potion.hasStatusIcon()) {
|
|
||||||
|
|
||||||
|
if (potion.hasStatusIcon()) {
|
||||||
GuiIngame guiIngame = new GuiIngame(mc);
|
GuiIngame guiIngame = new GuiIngame(mc);
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/inventory.png"));
|
mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/inventory.png"));
|
||||||
int i3 = potion.getStatusIconIndex();
|
int i3 = potion.getStatusIconIndex();
|
||||||
GlStateManager.tryBlendFuncSeparate(1, 1, 1, 0);
|
//GlStateManager.tryBlendFuncSeparate(1, 1, 1, 0);
|
||||||
guiIngame.drawTexturedModalRect(getX() + 21 - 20, getY() + i2 - 14, 0 + i3 % 8 * 18, 198 + i3 / 8 * 18, 18, 18);
|
guiIngame.drawTexturedModalRect(getX() + 1, getY() + i2 - 14, 0 + i3 % 8 * 18, 198 + i3 / 8 * 18, 18, 18);
|
||||||
}
|
}
|
||||||
|
|
||||||
String s1 = I18n.format(potion.getName(), new Object[0]);
|
String s1 = I18n.format(potion.getName(), new Object[0]);
|
||||||
if (potioneffect.getAmplifier() == 1) {
|
if (potioneffect.getAmplifier() == 1) {
|
||||||
s1 = String.valueOf(String.valueOf(s1)) + " " + I18n.format("enchantment.level.2", new Object[0]);
|
s1 = s1 + I18n.format("enchantment.level.2", new Object[0]);
|
||||||
} else if (potioneffect.getAmplifier() == 2) {
|
} else if (potioneffect.getAmplifier() == 2) {
|
||||||
s1 = String.valueOf(String.valueOf(s1)) + " " + I18n.format("enchantment.level.3", new Object[0]);
|
s1 = s1 + I18n.format("enchantment.level.3", new Object[0]);
|
||||||
} else if (potioneffect.getAmplifier() == 3) {
|
} else if (potioneffect.getAmplifier() == 3) {
|
||||||
s1 = String.valueOf(String.valueOf(s1)) + " " + I18n.format("enchantment.level.4", new Object[0]);
|
s1 = s1 + I18n.format("enchantment.level.4", new Object[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
mc.fontRendererObj.drawString(s1, (getX() + 21), (getY() + i2 - 14), -1, true);
|
mc.fontRendererObj.drawString(s1, (getX() + 21), (getY() + i2 - 14), -1, true);
|
||||||
String s2 = Potion.getDurationString(potioneffect);
|
String s2 = Potion.getDurationString(potioneffect);
|
||||||
mc.fontRendererObj.drawString(s2, (getX() + 21), (getY() + i2 + 10 - 14), -1, true);
|
mc.fontRendererObj.drawString(s2, (getX() + 21), (getY() + i2 + 10 - 14), -1, true);
|
||||||
|
|
|
@ -9,21 +9,21 @@ public class RenderUtils {
|
||||||
|
|
||||||
switch (asdf.getValue()) {
|
switch (asdf.getValue()) {
|
||||||
case "Red":
|
case "Red":
|
||||||
return new Color(255, 0, 0, 85).getRGB();
|
return new Color(255, 0, 0, 95).getRGB();
|
||||||
case "Yellow":
|
case "Yellow":
|
||||||
return new Color(255, 255, 0, 85).getRGB();
|
return new Color(255, 255, 0, 95).getRGB();
|
||||||
case "Green":
|
case "Green":
|
||||||
return new Color(0, 255, 0, 85).getRGB();
|
return new Color(0, 255, 0, 95).getRGB();
|
||||||
case "Blue":
|
case "Blue":
|
||||||
return new Color(0, 0, 255, 85).getRGB();
|
return new Color(0, 0, 255, 95).getRGB();
|
||||||
case "Orange":
|
case "Orange":
|
||||||
return new Color(255, 165, 0, 85).getRGB();
|
return new Color(255, 165, 0, 95).getRGB();
|
||||||
case "Pink":
|
case "Pink":
|
||||||
return new Color(255, 102, 255).getRGB();
|
return new Color(255, 102, 255, 95).getRGB();
|
||||||
case "Black":
|
case "Black":
|
||||||
return new Color(0, 0, 0, 85).getRGB();
|
return new Color(0, 0, 0, 95).getRGB();
|
||||||
case "White":
|
case "White":
|
||||||
return new Color(255, 255, 255, 85).getRGB();
|
return new Color(255, 255, 255, 95).getRGB();
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user