aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-08-11 13:03:30 +0200
committerGitHub <noreply@github.com>2022-08-11 21:03:30 +1000
commitba69e034794b7a5dc8d950ab4ba2d12370aa509f (patch)
tree840d97ddc4c67f09f99770a86a5fbbcc5f2349d9 /src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
parent4cf7ec9f8ee48b7ea22b2d514c3e7ff1be7daf0d (diff)
downloadnotenoughupdates-ba69e034794b7a5dc8d950ab4ba2d12370aa509f.tar.gz
notenoughupdates-ba69e034794b7a5dc8d950ab4ba2d12370aa509f.tar.bz2
notenoughupdates-ba69e034794b7a5dc8d950ab4ba2d12370aa509f.zip
display name (#219)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
index 4d546505..a99e4e7a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
@@ -841,15 +841,15 @@ public class Utils {
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
}
- public static ItemStack createItemStack(Item item, String displayname, String... lore) {
- return createItemStack(item, displayname, 0, lore);
+ public static ItemStack createItemStack(Item item, String displayName, String... lore) {
+ return createItemStack(item, displayName, 0, lore);
}
- public static ItemStack createItemStack(Block item, String displayname, String... lore) {
- return createItemStack(Item.getItemFromBlock(item), displayname, lore);
+ public static ItemStack createItemStack(Block item, String displayName, String... lore) {
+ return createItemStack(Item.getItemFromBlock(item), displayName, lore);
}
- public static ItemStack createItemStack(Item item, String displayname, int damage, String... lore) {
+ public static ItemStack createItemStack(Item item, String displayName, int damage, String... lore) {
ItemStack stack = new ItemStack(item, 1, damage);
NBTTagCompound tag = new NBTTagCompound();
NBTTagCompound display = new NBTTagCompound();
@@ -859,7 +859,7 @@ public class Utils {
Lore.appendTag(new NBTTagString(line));
}
- display.setString("Name", displayname);
+ display.setString("Name", displayName);
display.setTag("Lore", Lore);
tag.setTag("display", display);
@@ -1425,12 +1425,12 @@ public class Utils {
file.delete();
}
- public static char getPrimaryColourCode(String displayname) {
+ public static char getPrimaryColourCode(String displayName) {
int lastColourCode = -99;
int currentColour = 0;
int[] mostCommon = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- for (int i = 0; i < displayname.length(); i++) {
- char c = displayname.charAt(i);
+ for (int i = 0; i < displayName.length(); i++) {
+ char c = displayName.charAt(i);
if (c == '\u00A7') {
lastColourCode = i;
} else if (lastColourCode == i - 1) {
@@ -1457,8 +1457,8 @@ public class Utils {
return "0123456789abcdef".charAt(currentColour);
}
- public static Color getPrimaryColour(String displayname) {
- int colourInt = Minecraft.getMinecraft().fontRendererObj.getColorCode(getPrimaryColourCode(displayname));
+ public static Color getPrimaryColour(String displayName) {
+ int colourInt = Minecraft.getMinecraft().fontRendererObj.getColorCode(getPrimaryColourCode(displayName));
return new Color(colourInt).darker();
}