mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-26 07:03:05 +00:00
Return of Hidden Research and Item in Entries
These changes were taken from the old repo. I have no idea if those actually work yet if the mod even builds with them :) **Changes:** -Botania Lexicon Entries now take an ItemStack to display the ItemStack on the side when looking into the Lexica -Hidden Research with triggers for Items, Entitities and Aspects
This commit is contained in:
1 parent
3316f0b90d
commit
6fd85cbd10
3 files changed
+55
-35
No files matched your search
@@ -7,6 +7,8 @@ import static modtweaker2.helpers.InputHelper.toStack;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.Blocks;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
@@ -359,7 +361,7 @@ public class Lexicon {
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addEntry(String entry, String catagory) {
|
||||
public static void addEntry(String entry, String catagory, IItemStack stack) {
|
||||
LexiconCategory lexiconCategory=BotaniaHelper.findCatagory(catagory);
|
||||
if(lexiconCategory==null)
|
||||
{
|
||||
@@ -367,6 +369,7 @@ public class Lexicon {
|
||||
return;
|
||||
}
|
||||
LexiconEntry lexiconEntry=new LexiconEntry(entry,lexiconCategory);
|
||||
lexiconEntry.setIcon(toStack(stack));
|
||||
MineTweakerAPI.apply(new AddEntry(lexiconEntry));
|
||||
}
|
||||
@ZenMethod
|
||||
|
||||
Reference in new issue
Block a user