mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-17 03:05:03 +00:00
Added command to print Botania recipes
This commit is contained in:
1 parent
a0a8f2f26e
commit
0b18e5c12e
6 files changed
+149
-58
No files matched your search
@@ -1,12 +1,8 @@
|
||||
package modtweaker2.helpers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.MineTweakerImplementationAPI;
|
||||
import minetweaker.api.player.IPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class LogHelper {
|
||||
public static void logPrinted(IPlayer player) {
|
||||
@@ -41,44 +37,4 @@ public class LogHelper {
|
||||
public static void logInfo(String message) {
|
||||
MineTweakerAPI.logInfo("[ModTweaker2] " + message);
|
||||
}
|
||||
|
||||
public static String getArrayDescription(List<ItemStack> stacks) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append('[');
|
||||
for(ItemStack stack : stacks) {
|
||||
sb.append(InputHelper.getStackDescription(stack)).append(", ");
|
||||
}
|
||||
sb.setLength(sb.length() - 2);
|
||||
sb.append(']');
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static List<String> toLowerCase(List<String> stringList) {
|
||||
ListIterator<String> iterator = stringList.listIterator();
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
iterator.set(iterator.next().toLowerCase());
|
||||
}
|
||||
|
||||
return stringList;
|
||||
}
|
||||
|
||||
public static String join(List<String> list, String conjunction) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if(conjunction == null) {
|
||||
conjunction = ", ";
|
||||
}
|
||||
|
||||
if(list != null && !list.isEmpty()) {
|
||||
for(String string : list) {
|
||||
sb.append(string).append(conjunction);
|
||||
}
|
||||
|
||||
sb.setLength(sb.length() - conjunction.length());
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user