mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-12 00:07:57 +00:00
Also changes like all packages inb4 "jared changes a package name in ModTweaker2 breaking compatability with everything" drama tweet.
43 lines
1.4 KiB
Java
43 lines
1.4 KiB
Java
package modtweaker2.mods.botania.lexicon.commands;
|
|
|
|
import java.util.List;
|
|
|
|
import minetweaker.MineTweakerAPI;
|
|
import minetweaker.MineTweakerImplementationAPI;
|
|
import minetweaker.api.player.IPlayer;
|
|
import minetweaker.api.server.ICommandFunction;
|
|
import modtweaker2.mods.botania.BotaniaHelper;
|
|
import vazkii.botania.api.BotaniaAPI;
|
|
import vazkii.botania.api.lexicon.LexiconCategory;
|
|
import vazkii.botania.api.lexicon.LexiconEntry;
|
|
|
|
public class LexiconEntryLogger implements ICommandFunction{
|
|
|
|
@Override
|
|
public void execute(String[] arguments, IPlayer player) {
|
|
LexiconCategory category=null;
|
|
if(arguments.length>0)
|
|
{
|
|
category=BotaniaHelper.findCatagory(arguments[0]);
|
|
if(category==null)
|
|
{
|
|
MineTweakerAPI.getLogger().logError("Category not found (" + arguments[0]+")");
|
|
return;
|
|
}
|
|
}
|
|
List<LexiconEntry> entries=BotaniaAPI.getAllEntries();
|
|
System.out.println("Entries: " + entries.size());
|
|
for (LexiconEntry entry : entries) {
|
|
if(category==null || entry.category==category)
|
|
{
|
|
System.out.println("Entry " + entry.getUnlocalizedName());
|
|
MineTweakerAPI.logCommand(entry.getUnlocalizedName());
|
|
}
|
|
}
|
|
|
|
if (player != null) {
|
|
player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir"));
|
|
}
|
|
}
|
|
}
|