Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting the name of blocks / potion updates #19

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions Lib/src/main/java/me/desht/dhutils/ItemNames.java
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,14 @@ public class ItemNames {
.put("373:8200", "Weakness Potion (1:30)")
.put("373:8201", "Strength Potion (3:00)")
.put("373:8202", "Slowness Potion (1:30)")
.put("373:8203", "Potion of Leaping (3:00)")
.put("373:8204", "Harming Potion")
.put("373:8225", "Regeneration Potion II (0:22)")
.put("373:8226", "Swiftness Potion II (1:30)")
.put("373:8228", "Poison Potion II (0:22)")
.put("373:8229", "Healing Potion II")
.put("373:8230", "Night Vision Potion (3:00)")
.put("373:8233", "Strength Potion II (1:30)")
.put("373:8235", "Potion of Leaping (1:30)")
.put("373:8235", "Leaping Potion II (1:30)")
.put("373:8236", "Harming Potion II")
.put("373:8237", "Water Breathing Potion (3:00)")
.put("373:8238", "Invisibility Potion (3:00)")
Expand All @@ -453,6 +452,7 @@ public class ItemNames {
.put("373:8264", "Weakness Potion (4:00)")
.put("373:8265", "Strength Potion (8:00)")
.put("373:8266", "Slowness Potion (4:00)")
.put("373:8267", "Leaping Potion (3:00)")
.put("373:8269", "Water Breathing Potion (8:00)")
.put("373:8270", "Invisibility Potion (8:00)")
.put("373:16378", "Fire Resistance Splash (2:15)")
Expand All @@ -469,6 +469,7 @@ public class ItemNames {
.put("373:16421", "Healing Splash II")
.put("373:16422", "Night Vision Splash (2:15)")
.put("373:16425", "Strength Splash II (1:07)")
.put("373:16427", "Leaping Splash II (1:07)")
.put("373:16428", "Harming Splash II")
.put("373:16429", "Water Breathing Splash (2:15)")
.put("373:16430", "Invisibility Splash (2:15)")
Expand All @@ -480,6 +481,7 @@ public class ItemNames {
.put("373:16456", "Weakness Splash (3:00)")
.put("373:16457", "Strength Splash (6:00)")
.put("373:16458", "Slowness Splash (3:00)")
.put("373:16459", "Leaping Splash (2:15)")
.put("373:16461", "Water Breathing Splash (6:00)")
.put("373:16462", "Invisibility Splash (6:00)")
.put("373:16471", "Regeneration Splash II (0:16)")
Expand Down Expand Up @@ -620,6 +622,17 @@ public static String lookup(ItemStack stack) {

return result;
}

/**
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you tidy up the indentation here?

* Given an item stack, return a friendly printable name for the block, as
* the (English-language) vanilla Minecraft client would display it.
*
* @param block the block
* @return a friendly printable name for the block
*/
public static String lookup(Block block) {
return lookup(new ItemStack(block.getType(), 1, block.getData()));
}

/**
* Given an item stack return a friendly name for the item, in the form
Expand All @@ -634,4 +647,5 @@ public static String lookupWithAmount(ItemStack stack) {
String s = lookup(stack);
return stack.getAmount() + " x " + s;
}

}