fix format and use splitToList
This commit is contained in:
parent
be5b87eb12
commit
7a48cd63f3
3 changed files with 14 additions and 14 deletions
|
@ -14,13 +14,13 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
public class StringUtils {
|
||||
|
||||
public static final Splitter newLineSplitter = Splitter.on("\\n");
|
||||
public static final Splitter newLineSplitter = Splitter.on("\\n");
|
||||
|
||||
public static String localize(String key) {
|
||||
return StatCollector.translateToLocal(key);
|
||||
}
|
||||
public static String localize(String key) {
|
||||
return StatCollector.translateToLocal(key);
|
||||
}
|
||||
|
||||
public static boolean canLocalize(String key) {
|
||||
return StatCollector.canTranslate(key);
|
||||
}
|
||||
public static boolean canLocalize(String key) {
|
||||
return StatCollector.canTranslate(key);
|
||||
}
|
||||
}
|
|
@ -42,10 +42,10 @@ public class PipeToolTipManager {
|
|||
if (StringUtils.canLocalize(tipTag)) {
|
||||
String localized = StringUtils.localize(tipTag);
|
||||
if (localized != null) {
|
||||
String[] lines = (String[])Iterables.toArray(StringUtils.newLineSplitter.split(localized), String.class);
|
||||
tips.addAll(Arrays.asList(lines));
|
||||
List<String> lines = StringUtils.newLineSplitter.splitToList(localized);
|
||||
tips.addAll(lines);
|
||||
}
|
||||
}
|
||||
}
|
||||
String tip = toolTips.get(pipe);
|
||||
if (tip != null)
|
||||
tips.add(tip);
|
||||
|
|
|
@ -177,10 +177,10 @@ public class ItemGate extends ItemBuildCraft {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack)
|
||||
{
|
||||
return ("" + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack))).trim();
|
||||
}
|
||||
public String getItemStackDisplayName(ItemStack stack)
|
||||
{
|
||||
return ("" + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack))).trim();
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue