mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-21 21:02:19 +00:00
add: Command to log TConstruct Modifiers, fix: #238
This commit is contained in:
1 parent
4e92eddfd3
commit
8313b5c470
3 files changed
+32
-23
No files matched your search
+8
-22
@@ -1,10 +1,4 @@
|
||||
package modtweaker2.mods.tconstruct;
|
||||
|
||||
import static modtweaker2.helpers.LogHelper.logPrinted;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
package modtweaker2.mods.tconstruct.commands;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.player.IPlayer;
|
||||
@@ -12,25 +6,17 @@ import minetweaker.api.server.ICommandFunction;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.tools.ToolMaterial;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static modtweaker2.helpers.LogHelper.logPrinted;
|
||||
|
||||
public class MaterialLogger implements ICommandFunction {
|
||||
private static ArrayList<String> materials = new ArrayList<String>();
|
||||
static {
|
||||
materials = new ArrayList<String>();
|
||||
for (Map.Entry<String, ToolMaterial> entry : TConstructRegistry.toolMaterialStrings.entrySet()) {
|
||||
materials.add(entry.getKey());
|
||||
}
|
||||
|
||||
Collections.sort(materials);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(String[] arguments, IPlayer player) {
|
||||
System.out.println("Materials: " + materials.size());
|
||||
for (String s : materials) {
|
||||
System.out.println("Material " + s);
|
||||
MineTweakerAPI.logCommand("<" + s + "> -- ");
|
||||
MineTweakerAPI.logCommand(TConstructRegistry.toolMaterialStrings.entrySet().size() + " Materials:");
|
||||
for (Map.Entry<String, ToolMaterial> entry : TConstructRegistry.toolMaterialStrings.entrySet()) {
|
||||
MineTweakerAPI.logCommand(entry.getKey());
|
||||
}
|
||||
|
||||
logPrinted(player);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package modtweaker2.mods.tconstruct.commands;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.player.IPlayer;
|
||||
import minetweaker.api.server.ICommandFunction;
|
||||
import modtweaker2.mods.tconstruct.TConstructHelper;
|
||||
import tconstruct.library.modifier.ItemModifier;
|
||||
|
||||
import static modtweaker2.helpers.LogHelper.logPrinted;
|
||||
|
||||
public class ModifierLogger implements ICommandFunction{
|
||||
@Override
|
||||
public void execute(String[] arguments, IPlayer player) {
|
||||
MineTweakerAPI.logCommand(TConstructHelper.modifiers.size() + " Tinker's Construct modifiers:");
|
||||
for (ItemModifier modifier : TConstructHelper.modifiers) {
|
||||
if (!modifier.key.equals(""))
|
||||
MineTweakerAPI.logCommand(modifier.key);
|
||||
}
|
||||
logPrinted(player);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user