mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-18 11:39:07 +00:00
Added more commands, updated botania to the (not yet released) api version we need, improved error logging, added lexicon recipe mapping functions, added more sanity checks.
This commit is contained in:
1 parent
df85abd8c4
commit
e97761fe30
8 files changed
+241
No files matched your search
@@ -0,0 +1,53 @@
|
||||
package modtweaker.mods.botania.lexicon;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.lexicon.LexiconPage;
|
||||
import vazkii.botania.api.lexicon.LexiconRecipeMappings;
|
||||
import vazkii.botania.api.lexicon.LexiconRecipeMappings.EntryData;
|
||||
import minetweaker.IUndoableAction;
|
||||
|
||||
public class AddRecipeMapping implements IUndoableAction {
|
||||
|
||||
ItemStack stack;
|
||||
LexiconEntry entry;
|
||||
int page;
|
||||
|
||||
public AddRecipeMapping(ItemStack stack, LexiconEntry entry, int page) {
|
||||
this.stack =stack;
|
||||
this.entry=entry;
|
||||
this.page=page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
LexiconRecipeMappings.map(stack, entry, page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return "Adding Lexicon Recipe Lookup: " + stack.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo() {
|
||||
return "Removing Lexicon Recipe Lookup: " + stack.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo() {
|
||||
LexiconRecipeMappings.remove(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user