Run formatter
This commit is contained in:
parent
61c44a831b
commit
08258fd6ef
606 changed files with 13464 additions and 22975 deletions
|
@ -1,37 +1,32 @@
|
|||
package WayofTime.bloodmagic.compat.guideapi;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer;
|
||||
import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry;
|
||||
import WayofTime.bloodmagic.client.render.alchemyArray.DualAlchemyCircleRenderer;
|
||||
import WayofTime.bloodmagic.compat.guideapi.page.PageAlchemyArray;
|
||||
import amerifrance.guideapi.page.PageIRecipe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class BookUtils
|
||||
{
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public static PageAlchemyArray getAlchemyPage(String key)
|
||||
{
|
||||
public class BookUtils {
|
||||
|
||||
public static PageAlchemyArray getAlchemyPage(String key) {
|
||||
ItemStack[] recipe = AlchemyArrayRecipeRegistry.getRecipeForArrayEffect(key);
|
||||
if (recipe[0] != null)
|
||||
{
|
||||
if (recipe[0] != null) {
|
||||
ItemStack inputStack = recipe[0];
|
||||
ItemStack catalystStack = recipe[1];
|
||||
|
||||
AlchemyCircleRenderer renderer = AlchemyArrayRecipeRegistry.getAlchemyCircleRenderer(inputStack, catalystStack);
|
||||
if (renderer instanceof DualAlchemyCircleRenderer)
|
||||
{
|
||||
if (renderer instanceof DualAlchemyCircleRenderer) {
|
||||
List<ResourceLocation> resources = new ArrayList<ResourceLocation>();
|
||||
resources.add(((DualAlchemyCircleRenderer) renderer).arrayResource);
|
||||
resources.add(((DualAlchemyCircleRenderer) renderer).secondaryArrayResource);
|
||||
return new PageAlchemyArray(resources, inputStack, catalystStack);
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
return new PageAlchemyArray(renderer.arrayResource, inputStack, catalystStack);
|
||||
}
|
||||
}
|
||||
|
@ -39,25 +34,20 @@ public class BookUtils
|
|||
return null;
|
||||
}
|
||||
|
||||
public static PageAlchemyArray getAlchemyPage(ItemStack outputStack)
|
||||
{
|
||||
public static PageAlchemyArray getAlchemyPage(ItemStack outputStack) {
|
||||
ItemStack[] recipe = AlchemyArrayRecipeRegistry.getRecipeForOutputStack(outputStack);
|
||||
if (recipe[0] != null)
|
||||
{
|
||||
if (recipe[0] != null) {
|
||||
ItemStack inputStack = recipe[0];
|
||||
ItemStack catalystStack = recipe[1];
|
||||
|
||||
AlchemyCircleRenderer renderer = AlchemyArrayRecipeRegistry.getAlchemyCircleRenderer(inputStack, catalystStack);
|
||||
if (renderer != null)
|
||||
{
|
||||
if (renderer instanceof DualAlchemyCircleRenderer)
|
||||
{
|
||||
if (renderer != null) {
|
||||
if (renderer instanceof DualAlchemyCircleRenderer) {
|
||||
List<ResourceLocation> resources = new ArrayList<ResourceLocation>();
|
||||
resources.add(((DualAlchemyCircleRenderer) renderer).arrayResource);
|
||||
resources.add(((DualAlchemyCircleRenderer) renderer).secondaryArrayResource);
|
||||
return new PageAlchemyArray(resources, inputStack, catalystStack, outputStack);
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
return new PageAlchemyArray(renderer.arrayResource, inputStack, catalystStack, outputStack);
|
||||
}
|
||||
}
|
||||
|
@ -66,8 +56,7 @@ public class BookUtils
|
|||
return null;
|
||||
}
|
||||
|
||||
public static PageIRecipe getPageForRecipe(IRecipe recipe)
|
||||
{
|
||||
public static PageIRecipe getPageForRecipe(IRecipe recipe) {
|
||||
return new PageIRecipe(recipe);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.bloodmagic.compat.guideapi;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.compat.guideapi.book.*;
|
||||
import WayofTime.bloodmagic.compat.guideapi.book.CategoryAlchemy;
|
||||
import WayofTime.bloodmagic.compat.guideapi.book.CategoryArchitect;
|
||||
import WayofTime.bloodmagic.compat.guideapi.book.CategoryDemon;
|
||||
import WayofTime.bloodmagic.compat.guideapi.book.CategoryRitual;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicBlocks;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||
import amerifrance.guideapi.api.GuideAPI;
|
||||
|
|
|
@ -22,10 +22,8 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class CategoryAlchemy
|
||||
{
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory()
|
||||
{
|
||||
public class CategoryAlchemy {
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory() {
|
||||
Map<ResourceLocation, EntryAbstract> entries = new LinkedHashMap<ResourceLocation, EntryAbstract>();
|
||||
String keyBase = "guide." + BloodMagic.MODID + ".entry.alchemy.";
|
||||
|
||||
|
@ -36,8 +34,7 @@ public class CategoryAlchemy
|
|||
List<IPage> ashPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe ashRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.ARCANE_ASHES));
|
||||
if (ashRecipe != null)
|
||||
{
|
||||
if (ashRecipe != null) {
|
||||
ashPages.add(new PageTartaricForgeRecipe(ashRecipe));
|
||||
}
|
||||
ashPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "ash" + ".info"), 370));
|
||||
|
@ -46,8 +43,7 @@ public class CategoryAlchemy
|
|||
List<IPage> speedPages = new ArrayList<IPage>();
|
||||
|
||||
PageAlchemyArray speedRecipePage = BookUtils.getAlchemyPage("movement");
|
||||
if (speedRecipePage != null)
|
||||
{
|
||||
if (speedRecipePage != null) {
|
||||
speedPages.add(speedRecipePage);
|
||||
}
|
||||
speedPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "speed" + ".info"), 370));
|
||||
|
@ -56,8 +52,7 @@ public class CategoryAlchemy
|
|||
List<IPage> updraftPages = new ArrayList<IPage>();
|
||||
|
||||
PageAlchemyArray updraftRecipePage = BookUtils.getAlchemyPage("updraft");
|
||||
if (updraftRecipePage != null)
|
||||
{
|
||||
if (updraftRecipePage != null) {
|
||||
updraftPages.add(updraftRecipePage);
|
||||
}
|
||||
updraftPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "updraft" + ".info"), 370));
|
||||
|
@ -66,8 +61,7 @@ public class CategoryAlchemy
|
|||
List<IPage> turretPages = new ArrayList<IPage>();
|
||||
|
||||
PageAlchemyArray turretRecipePage = BookUtils.getAlchemyPage("skeletonTurret");
|
||||
if (turretRecipePage != null)
|
||||
{
|
||||
if (turretRecipePage != null) {
|
||||
turretPages.add(turretRecipePage);
|
||||
}
|
||||
turretPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "turret" + ".info"), 370));
|
||||
|
@ -76,8 +70,7 @@ public class CategoryAlchemy
|
|||
List<IPage> bouncePages = new ArrayList<IPage>();
|
||||
|
||||
PageAlchemyArray bounceRecipePage = BookUtils.getAlchemyPage("bounce");
|
||||
if (bounceRecipePage != null)
|
||||
{
|
||||
if (bounceRecipePage != null) {
|
||||
bouncePages.add(bounceRecipePage);
|
||||
}
|
||||
bouncePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "bounce" + ".info"), 370));
|
||||
|
@ -91,19 +84,15 @@ public class CategoryAlchemy
|
|||
List<IPage> fastMinerPages = new ArrayList<IPage>();
|
||||
|
||||
PageAlchemyArray fastMinerRecipePage = BookUtils.getAlchemyPage("fastMiner");
|
||||
if (fastMinerRecipePage != null)
|
||||
{
|
||||
if (fastMinerRecipePage != null) {
|
||||
fastMinerPages.add(fastMinerRecipePage);
|
||||
}
|
||||
fastMinerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "fastMiner" + ".info"), 370));
|
||||
entries.put(new ResourceLocation(keyBase + "fastMiner"), new EntryText(fastMinerPages, TextHelper.localize(keyBase + "fastMiner"), true));
|
||||
|
||||
for (Entry<ResourceLocation, EntryAbstract> entry : entries.entrySet())
|
||||
{
|
||||
for (IPage page : entry.getValue().pageList)
|
||||
{
|
||||
if (page instanceof PageText)
|
||||
{
|
||||
for (Entry<ResourceLocation, EntryAbstract> entry : entries.entrySet()) {
|
||||
for (IPage page : entry.getValue().pageList) {
|
||||
if (page instanceof PageText) {
|
||||
((PageText) page).setUnicodeFlag(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,6 @@
|
|||
package WayofTime.bloodmagic.compat.guideapi.book;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagic;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe;
|
||||
import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry.AltarRecipe;
|
||||
import WayofTime.bloodmagic.api.registry.OrbRegistry;
|
||||
|
@ -19,20 +9,28 @@ import WayofTime.bloodmagic.compat.guideapi.entry.EntryText;
|
|||
import WayofTime.bloodmagic.compat.guideapi.page.PageAlchemyArray;
|
||||
import WayofTime.bloodmagic.compat.guideapi.page.PageAltarRecipe;
|
||||
import WayofTime.bloodmagic.compat.guideapi.page.PageTartaricForgeRecipe;
|
||||
import WayofTime.bloodmagic.item.ItemComponent;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagic;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicBlocks;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||
import WayofTime.bloodmagic.item.ItemComponent;
|
||||
import WayofTime.bloodmagic.util.helper.RecipeHelper;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import amerifrance.guideapi.api.IPage;
|
||||
import amerifrance.guideapi.api.impl.abstraction.EntryAbstract;
|
||||
import amerifrance.guideapi.api.util.PageHelper;
|
||||
import amerifrance.guideapi.page.PageText;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class CategoryArchitect
|
||||
{
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory()
|
||||
{
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class CategoryArchitect {
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory() {
|
||||
Map<ResourceLocation, EntryAbstract> entries = new LinkedHashMap<ResourceLocation, EntryAbstract>();
|
||||
String keyBase = "guide." + BloodMagic.MODID + ".entry.architect.";
|
||||
|
||||
|
@ -44,16 +42,14 @@ public class CategoryArchitect
|
|||
List<IPage> altarPages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe altarRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.ALTAR));
|
||||
if (altarRecipe != null)
|
||||
{
|
||||
if (altarRecipe != null) {
|
||||
altarPages.add(BookUtils.getPageForRecipe(altarRecipe));
|
||||
}
|
||||
|
||||
altarPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "bloodaltar" + ".info.1"), 370));
|
||||
|
||||
IRecipe daggerRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.SACRIFICIAL_DAGGER));
|
||||
if (daggerRecipe != null)
|
||||
{
|
||||
if (daggerRecipe != null) {
|
||||
altarPages.add(BookUtils.getPageForRecipe(daggerRecipe));
|
||||
}
|
||||
|
||||
|
@ -63,8 +59,7 @@ public class CategoryArchitect
|
|||
List<IPage> ashPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe ashRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.ARCANE_ASHES));
|
||||
if (ashRecipe != null)
|
||||
{
|
||||
if (ashRecipe != null) {
|
||||
ashPages.add(new PageTartaricForgeRecipe(ashRecipe));
|
||||
}
|
||||
ashPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "ash" + ".info"), 370));
|
||||
|
@ -73,8 +68,7 @@ public class CategoryArchitect
|
|||
List<IPage> divinationPages = new ArrayList<IPage>();
|
||||
|
||||
PageAlchemyArray divinationRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_DIVINATION));
|
||||
if (divinationRecipePage != null)
|
||||
{
|
||||
if (divinationRecipePage != null) {
|
||||
divinationPages.add(divinationRecipePage);
|
||||
}
|
||||
|
||||
|
@ -90,8 +84,7 @@ public class CategoryArchitect
|
|||
weakorbPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "weakorb" + ".info.1"), 370));
|
||||
|
||||
AltarRecipe weakorbRecipe = RecipeHelper.getAltarRecipeForOutput(OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_WEAK));
|
||||
if (weakorbRecipe != null)
|
||||
{
|
||||
if (weakorbRecipe != null) {
|
||||
weakorbPages.add(new PageAltarRecipe(weakorbRecipe));
|
||||
}
|
||||
|
||||
|
@ -101,16 +94,14 @@ public class CategoryArchitect
|
|||
List<IPage> incensePages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe incenseRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.INCENSE_ALTAR));
|
||||
if (incenseRecipe != null)
|
||||
{
|
||||
if (incenseRecipe != null) {
|
||||
incensePages.add(BookUtils.getPageForRecipe(incenseRecipe));
|
||||
}
|
||||
|
||||
incensePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "incense" + ".info.1"), 370));
|
||||
|
||||
IRecipe woodPathRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.PATH, 1, 0));
|
||||
if (woodPathRecipe != null)
|
||||
{
|
||||
if (woodPathRecipe != null) {
|
||||
incensePages.add(BookUtils.getPageForRecipe(woodPathRecipe));
|
||||
}
|
||||
|
||||
|
@ -120,8 +111,7 @@ public class CategoryArchitect
|
|||
List<IPage> runePages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe runeRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 0));
|
||||
if (runeRecipe != null)
|
||||
{
|
||||
if (runeRecipe != null) {
|
||||
runePages.add(BookUtils.getPageForRecipe(runeRecipe));
|
||||
}
|
||||
|
||||
|
@ -131,8 +121,7 @@ public class CategoryArchitect
|
|||
List<IPage> inspectPages = new ArrayList<IPage>();
|
||||
|
||||
AltarRecipe inspectRecipe = RecipeHelper.getAltarRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.SANGUINE_BOOK));
|
||||
if (inspectRecipe != null)
|
||||
{
|
||||
if (inspectRecipe != null) {
|
||||
inspectPages.add(new PageAltarRecipe(inspectRecipe));
|
||||
}
|
||||
|
||||
|
@ -142,8 +131,7 @@ public class CategoryArchitect
|
|||
List<IPage> speedRunePages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe speedRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 1));
|
||||
if (speedRecipe != null)
|
||||
{
|
||||
if (speedRecipe != null) {
|
||||
speedRunePages.add(BookUtils.getPageForRecipe(speedRecipe));
|
||||
}
|
||||
|
||||
|
@ -153,14 +141,12 @@ public class CategoryArchitect
|
|||
List<IPage> waterPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe waterRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_WATER));
|
||||
if (waterRecipe != null)
|
||||
{
|
||||
if (waterRecipe != null) {
|
||||
waterPages.add(new PageTartaricForgeRecipe(waterRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray waterRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_WATER));
|
||||
if (waterRecipePage != null)
|
||||
{
|
||||
if (waterRecipePage != null) {
|
||||
waterPages.add(waterRecipePage);
|
||||
}
|
||||
|
||||
|
@ -170,14 +156,12 @@ public class CategoryArchitect
|
|||
List<IPage> lavaPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe lavaRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_LAVA));
|
||||
if (lavaRecipe != null)
|
||||
{
|
||||
if (lavaRecipe != null) {
|
||||
lavaPages.add(new PageTartaricForgeRecipe(lavaRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray lavaRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_LAVA));
|
||||
if (lavaRecipePage != null)
|
||||
{
|
||||
if (lavaRecipePage != null) {
|
||||
lavaPages.add(lavaRecipePage);
|
||||
}
|
||||
|
||||
|
@ -187,8 +171,7 @@ public class CategoryArchitect
|
|||
List<IPage> lavaCrystalPages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe lavaCrystalRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.LAVA_CRYSTAL));
|
||||
if (lavaCrystalRecipe != null)
|
||||
{
|
||||
if (lavaCrystalRecipe != null) {
|
||||
lavaCrystalPages.add(BookUtils.getPageForRecipe(lavaCrystalRecipe));
|
||||
}
|
||||
|
||||
|
@ -198,8 +181,7 @@ public class CategoryArchitect
|
|||
List<IPage> apprenticeorbPages = new ArrayList<IPage>();
|
||||
|
||||
AltarRecipe apprenticeorbRecipe = RecipeHelper.getAltarRecipeForOutput(OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_APPRENTICE));
|
||||
if (apprenticeorbRecipe != null)
|
||||
{
|
||||
if (apprenticeorbRecipe != null) {
|
||||
apprenticeorbPages.add(new PageAltarRecipe(apprenticeorbRecipe));
|
||||
}
|
||||
|
||||
|
@ -209,8 +191,7 @@ public class CategoryArchitect
|
|||
List<IPage> daggerPages = new ArrayList<IPage>();
|
||||
|
||||
AltarRecipe daggerOfSacrificeRecipe = RecipeHelper.getAltarRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.DAGGER_OF_SACRIFICE));
|
||||
if (daggerOfSacrificeRecipe != null)
|
||||
{
|
||||
if (daggerOfSacrificeRecipe != null) {
|
||||
daggerPages.add(new PageAltarRecipe(daggerOfSacrificeRecipe));
|
||||
}
|
||||
|
||||
|
@ -220,8 +201,7 @@ public class CategoryArchitect
|
|||
List<IPage> runeSacrificePages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe runeSacrificeRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 3));
|
||||
if (runeSacrificeRecipe != null)
|
||||
{
|
||||
if (runeSacrificeRecipe != null) {
|
||||
runeSacrificePages.add(BookUtils.getPageForRecipe(runeSacrificeRecipe));
|
||||
}
|
||||
|
||||
|
@ -231,8 +211,7 @@ public class CategoryArchitect
|
|||
List<IPage> runeSelfSacrificePages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe runeSelfSacrificeRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 4));
|
||||
if (runeSelfSacrificeRecipe != null)
|
||||
{
|
||||
if (runeSelfSacrificeRecipe != null) {
|
||||
runeSelfSacrificePages.add(BookUtils.getPageForRecipe(runeSelfSacrificeRecipe));
|
||||
}
|
||||
|
||||
|
@ -242,14 +221,12 @@ public class CategoryArchitect
|
|||
List<IPage> holdingPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe holdingRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_HOLDING));
|
||||
if (holdingRecipe != null)
|
||||
{
|
||||
if (holdingRecipe != null) {
|
||||
holdingPages.add(new PageTartaricForgeRecipe(holdingRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray holdingRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_HOLDING));
|
||||
if (holdingRecipePage != null)
|
||||
{
|
||||
if (holdingRecipePage != null) {
|
||||
holdingPages.add(holdingRecipePage);
|
||||
}
|
||||
|
||||
|
@ -259,14 +236,12 @@ public class CategoryArchitect
|
|||
List<IPage> airPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe airRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_AIR));
|
||||
if (airRecipe != null)
|
||||
{
|
||||
if (airRecipe != null) {
|
||||
airPages.add(new PageTartaricForgeRecipe(airRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray airRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_AIR));
|
||||
if (airRecipePage != null)
|
||||
{
|
||||
if (airRecipePage != null) {
|
||||
airPages.add(airRecipePage);
|
||||
}
|
||||
|
||||
|
@ -276,14 +251,12 @@ public class CategoryArchitect
|
|||
List<IPage> voidPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe voidRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_VOID));
|
||||
if (voidRecipe != null)
|
||||
{
|
||||
if (voidRecipe != null) {
|
||||
voidPages.add(new PageTartaricForgeRecipe(voidRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray voidRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_VOID));
|
||||
if (voidRecipePage != null)
|
||||
{
|
||||
if (voidRecipePage != null) {
|
||||
voidPages.add(voidRecipePage);
|
||||
}
|
||||
|
||||
|
@ -293,14 +266,12 @@ public class CategoryArchitect
|
|||
List<IPage> greenGrovePages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe greenGroveRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_GROWTH));
|
||||
if (greenGroveRecipe != null)
|
||||
{
|
||||
if (greenGroveRecipe != null) {
|
||||
greenGrovePages.add(new PageTartaricForgeRecipe(greenGroveRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray greenGroveRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_GREEN_GROVE));
|
||||
if (greenGroveRecipePage != null)
|
||||
{
|
||||
if (greenGroveRecipePage != null) {
|
||||
greenGrovePages.add(greenGroveRecipePage);
|
||||
}
|
||||
|
||||
|
@ -310,14 +281,12 @@ public class CategoryArchitect
|
|||
List<IPage> fastMinerPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe fastMinerRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_FASTMINER));
|
||||
if (fastMinerRecipe != null)
|
||||
{
|
||||
if (fastMinerRecipe != null) {
|
||||
fastMinerPages.add(new PageTartaricForgeRecipe(fastMinerRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray fastMinerRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_FAST_MINER));
|
||||
if (fastMinerRecipePage != null)
|
||||
{
|
||||
if (fastMinerRecipePage != null) {
|
||||
fastMinerPages.add(fastMinerRecipePage);
|
||||
}
|
||||
|
||||
|
@ -327,14 +296,12 @@ public class CategoryArchitect
|
|||
List<IPage> seerPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe seerRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_SIGHT));
|
||||
if (seerRecipe != null)
|
||||
{
|
||||
if (seerRecipe != null) {
|
||||
seerPages.add(new PageTartaricForgeRecipe(seerRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray seerRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_SEER));
|
||||
if (seerRecipePage != null)
|
||||
{
|
||||
if (seerRecipePage != null) {
|
||||
seerPages.add(seerRecipePage);
|
||||
}
|
||||
|
||||
|
@ -344,8 +311,7 @@ public class CategoryArchitect
|
|||
List<IPage> magicianOrbPages = new ArrayList<IPage>();
|
||||
|
||||
AltarRecipe magicianOrbRecipe = RecipeHelper.getAltarRecipeForOutput(OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_MAGICIAN));
|
||||
if (magicianOrbRecipe != null)
|
||||
{
|
||||
if (magicianOrbRecipe != null) {
|
||||
magicianOrbPages.add(new PageAltarRecipe(magicianOrbRecipe));
|
||||
}
|
||||
|
||||
|
@ -355,8 +321,7 @@ public class CategoryArchitect
|
|||
List<IPage> capacityPages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe capacityRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 4));
|
||||
if (capacityRecipe != null)
|
||||
{
|
||||
if (capacityRecipe != null) {
|
||||
capacityPages.add(BookUtils.getPageForRecipe(capacityRecipe));
|
||||
}
|
||||
|
||||
|
@ -366,8 +331,7 @@ public class CategoryArchitect
|
|||
List<IPage> displacementPages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe displacementRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 4));
|
||||
if (displacementRecipe != null)
|
||||
{
|
||||
if (displacementRecipe != null) {
|
||||
displacementPages.add(BookUtils.getPageForRecipe(displacementRecipe));
|
||||
}
|
||||
|
||||
|
@ -377,14 +341,12 @@ public class CategoryArchitect
|
|||
List<IPage> affinityPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe affinityRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_AFFINITY));
|
||||
if (affinityRecipe != null)
|
||||
{
|
||||
if (affinityRecipe != null) {
|
||||
affinityPages.add(new PageTartaricForgeRecipe(affinityRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray affinityRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_ELEMENTAL_AFFINITY));
|
||||
if (affinityRecipePage != null)
|
||||
{
|
||||
if (affinityRecipePage != null) {
|
||||
affinityPages.add(affinityRecipePage);
|
||||
}
|
||||
|
||||
|
@ -394,14 +356,12 @@ public class CategoryArchitect
|
|||
List<IPage> lampPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe lampRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT));
|
||||
if (lampRecipe != null)
|
||||
{
|
||||
if (lampRecipe != null) {
|
||||
lampPages.add(new PageTartaricForgeRecipe(lampRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray lampRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_BLOOD_LIGHT));
|
||||
if (lampRecipePage != null)
|
||||
{
|
||||
if (lampRecipePage != null) {
|
||||
lampPages.add(lampRecipePage);
|
||||
}
|
||||
|
||||
|
@ -411,14 +371,12 @@ public class CategoryArchitect
|
|||
List<IPage> magnetismPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe magnetismRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_MAGNETISM));
|
||||
if (magnetismRecipe != null)
|
||||
{
|
||||
if (magnetismRecipe != null) {
|
||||
magnetismPages.add(new PageTartaricForgeRecipe(magnetismRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray magnetismRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_MAGNETISM));
|
||||
if (magnetismRecipePage != null)
|
||||
{
|
||||
if (magnetismRecipePage != null) {
|
||||
magnetismPages.add(magnetismRecipePage);
|
||||
}
|
||||
|
||||
|
@ -428,8 +386,7 @@ public class CategoryArchitect
|
|||
List<IPage> peritiaPages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe peritiaRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.EXPERIENCE_TOME));
|
||||
if (peritiaRecipe != null)
|
||||
{
|
||||
if (peritiaRecipe != null) {
|
||||
peritiaPages.add(BookUtils.getPageForRecipe(peritiaRecipe));
|
||||
}
|
||||
|
||||
|
@ -439,32 +396,27 @@ public class CategoryArchitect
|
|||
List<IPage> livingArmourPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe bindingRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_BINDING));
|
||||
if (bindingRecipe != null)
|
||||
{
|
||||
if (bindingRecipe != null) {
|
||||
livingArmourPages.add(new PageTartaricForgeRecipe(bindingRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray bindingRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.LIVING_ARMOUR_CHEST));
|
||||
if (bindingRecipePage != null)
|
||||
{
|
||||
if (bindingRecipePage != null) {
|
||||
livingArmourPages.add(bindingRecipePage);
|
||||
}
|
||||
|
||||
bindingRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.LIVING_ARMOUR_HELMET));
|
||||
if (bindingRecipePage != null)
|
||||
{
|
||||
if (bindingRecipePage != null) {
|
||||
livingArmourPages.add(bindingRecipePage);
|
||||
}
|
||||
|
||||
bindingRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.LIVING_ARMOUR_LEGS));
|
||||
if (bindingRecipePage != null)
|
||||
{
|
||||
if (bindingRecipePage != null) {
|
||||
livingArmourPages.add(bindingRecipePage);
|
||||
}
|
||||
|
||||
bindingRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.LIVING_ARMOUR_BOOTS));
|
||||
if (bindingRecipePage != null)
|
||||
{
|
||||
if (bindingRecipePage != null) {
|
||||
livingArmourPages.add(bindingRecipePage);
|
||||
}
|
||||
|
||||
|
@ -484,14 +436,12 @@ public class CategoryArchitect
|
|||
List<IPage> teleposerPages = new ArrayList<IPage>();
|
||||
|
||||
AltarRecipe teleposerFocusRecipe = RecipeHelper.getAltarRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.TELEPOSITION_FOCUS));
|
||||
if (teleposerFocusRecipe != null)
|
||||
{
|
||||
if (teleposerFocusRecipe != null) {
|
||||
teleposerPages.add(new PageAltarRecipe(teleposerFocusRecipe));
|
||||
}
|
||||
|
||||
IRecipe teleposerRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.TELEPOSER));
|
||||
if (teleposerRecipe != null)
|
||||
{
|
||||
if (teleposerRecipe != null) {
|
||||
teleposerPages.add(BookUtils.getPageForRecipe(teleposerRecipe));
|
||||
}
|
||||
|
||||
|
@ -501,8 +451,7 @@ public class CategoryArchitect
|
|||
List<IPage> boundBladePages = new ArrayList<IPage>();
|
||||
|
||||
PageAlchemyArray boundBladePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.BOUND_SWORD));
|
||||
if (boundBladePage != null)
|
||||
{
|
||||
if (boundBladePage != null) {
|
||||
boundBladePages.add(boundBladePage);
|
||||
}
|
||||
|
||||
|
@ -512,20 +461,17 @@ public class CategoryArchitect
|
|||
List<IPage> boundToolPages = new ArrayList<IPage>();
|
||||
|
||||
PageAlchemyArray boundToolPage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.BOUND_PICKAXE));
|
||||
if (boundToolPage != null)
|
||||
{
|
||||
if (boundToolPage != null) {
|
||||
boundToolPages.add(boundToolPage);
|
||||
}
|
||||
|
||||
boundToolPage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.BOUND_AXE));
|
||||
if (boundToolPage != null)
|
||||
{
|
||||
if (boundToolPage != null) {
|
||||
boundToolPages.add(boundToolPage);
|
||||
}
|
||||
|
||||
boundToolPage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.BOUND_SHOVEL));
|
||||
if (boundToolPage != null)
|
||||
{
|
||||
if (boundToolPage != null) {
|
||||
boundToolPages.add(boundToolPage);
|
||||
}
|
||||
|
||||
|
@ -540,8 +486,7 @@ public class CategoryArchitect
|
|||
List<IPage> masterOrbPages = new ArrayList<IPage>();
|
||||
|
||||
AltarRecipe masterOrbRecipe = RecipeHelper.getAltarRecipeForOutput(OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_MASTER));
|
||||
if (magicianOrbRecipe != null)
|
||||
{
|
||||
if (magicianOrbRecipe != null) {
|
||||
masterOrbPages.add(new PageAltarRecipe(masterOrbRecipe));
|
||||
}
|
||||
|
||||
|
@ -551,8 +496,7 @@ public class CategoryArchitect
|
|||
List<IPage> orbRunePages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe orbRuneRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 8));
|
||||
if (orbRuneRecipe != null)
|
||||
{
|
||||
if (orbRuneRecipe != null) {
|
||||
orbRunePages.add(BookUtils.getPageForRecipe(orbRuneRecipe));
|
||||
}
|
||||
|
||||
|
@ -562,8 +506,7 @@ public class CategoryArchitect
|
|||
List<IPage> augmentedCapacityPages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe augmentedCapacityRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 7));
|
||||
if (orbRuneRecipe != null)
|
||||
{
|
||||
if (orbRuneRecipe != null) {
|
||||
augmentedCapacityPages.add(BookUtils.getPageForRecipe(augmentedCapacityRecipe));
|
||||
}
|
||||
|
||||
|
@ -573,8 +516,7 @@ public class CategoryArchitect
|
|||
List<IPage> chargingPages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe chargingRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 10));
|
||||
if (orbRuneRecipe != null)
|
||||
{
|
||||
if (orbRuneRecipe != null) {
|
||||
chargingPages.add(BookUtils.getPageForRecipe(chargingRecipe));
|
||||
}
|
||||
|
||||
|
@ -584,8 +526,7 @@ public class CategoryArchitect
|
|||
List<IPage> accelerationPages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe accelerationRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 9));
|
||||
if (orbRuneRecipe != null)
|
||||
{
|
||||
if (orbRuneRecipe != null) {
|
||||
accelerationPages.add(BookUtils.getPageForRecipe(accelerationRecipe));
|
||||
}
|
||||
|
||||
|
@ -595,14 +536,12 @@ public class CategoryArchitect
|
|||
List<IPage> suppressionPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe suppressionRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION));
|
||||
if (suppressionRecipe != null)
|
||||
{
|
||||
if (suppressionRecipe != null) {
|
||||
suppressionPages.add(new PageTartaricForgeRecipe(suppressionRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray suppressionRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_SUPPRESSION));
|
||||
if (suppressionRecipePage != null)
|
||||
{
|
||||
if (suppressionRecipePage != null) {
|
||||
suppressionPages.add(suppressionRecipePage);
|
||||
}
|
||||
|
||||
|
@ -612,14 +551,12 @@ public class CategoryArchitect
|
|||
List<IPage> hastePages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe hasteRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_HASTE));
|
||||
if (hasteRecipe != null)
|
||||
{
|
||||
if (hasteRecipe != null) {
|
||||
hastePages.add(new PageTartaricForgeRecipe(hasteRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray hasteRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_HASTE));
|
||||
if (hasteRecipePage != null)
|
||||
{
|
||||
if (hasteRecipePage != null) {
|
||||
hastePages.add(hasteRecipePage);
|
||||
}
|
||||
|
||||
|
@ -629,14 +566,12 @@ public class CategoryArchitect
|
|||
List<IPage> severancePages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe severanceRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_SEVERANCE));
|
||||
if (severanceRecipe != null)
|
||||
{
|
||||
if (severanceRecipe != null) {
|
||||
severancePages.add(new PageTartaricForgeRecipe(severanceRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray severanceRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_ENDER_SEVERANCE));
|
||||
if (severanceRecipePage != null)
|
||||
{
|
||||
if (severanceRecipePage != null) {
|
||||
severancePages.add(severanceRecipePage);
|
||||
}
|
||||
|
||||
|
@ -646,14 +581,12 @@ public class CategoryArchitect
|
|||
List<IPage> telepositionPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe telepositionRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_TELEPOSITION));
|
||||
if (telepositionRecipe != null)
|
||||
{
|
||||
if (telepositionRecipe != null) {
|
||||
telepositionPages.add(new PageTartaricForgeRecipe(telepositionRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray telepositionRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_TELEPOSITION));
|
||||
if (telepositionRecipePage != null)
|
||||
{
|
||||
if (telepositionRecipePage != null) {
|
||||
telepositionPages.add(telepositionRecipePage);
|
||||
}
|
||||
|
||||
|
@ -663,14 +596,12 @@ public class CategoryArchitect
|
|||
List<IPage> compressionPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe compressionRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_COMPRESSION));
|
||||
if (compressionRecipe != null)
|
||||
{
|
||||
if (compressionRecipe != null) {
|
||||
compressionPages.add(new PageTartaricForgeRecipe(compressionRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray compressionRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_COMPRESSION));
|
||||
if (compressionRecipePage != null)
|
||||
{
|
||||
if (compressionRecipePage != null) {
|
||||
compressionPages.add(compressionRecipePage);
|
||||
}
|
||||
|
||||
|
@ -680,14 +611,12 @@ public class CategoryArchitect
|
|||
List<IPage> bridgePages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe bridgeRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_BRIDGE));
|
||||
if (bridgeRecipe != null)
|
||||
{
|
||||
if (bridgeRecipe != null) {
|
||||
bridgePages.add(new PageTartaricForgeRecipe(bridgeRecipe));
|
||||
}
|
||||
|
||||
PageAlchemyArray bridgeRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_PHANTOM_BRIDGE));
|
||||
if (bridgeRecipePage != null)
|
||||
{
|
||||
if (bridgeRecipePage != null) {
|
||||
bridgePages.add(bridgeRecipePage);
|
||||
}
|
||||
|
||||
|
@ -697,20 +626,16 @@ public class CategoryArchitect
|
|||
List<IPage> mimicPages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe mimicRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.MIMIC, 1, 1));
|
||||
if (mimicRecipe != null)
|
||||
{
|
||||
if (mimicRecipe != null) {
|
||||
mimicPages.add(BookUtils.getPageForRecipe(mimicRecipe));
|
||||
}
|
||||
|
||||
mimicPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "mimic" + ".info.1"), 370));
|
||||
entries.put(new ResourceLocation(keyBase + "mimic"), new EntryText(mimicPages, TextHelper.localize(keyBase + "mimic"), true));
|
||||
|
||||
for (Entry<ResourceLocation, EntryAbstract> entry : entries.entrySet())
|
||||
{
|
||||
for (IPage page : entry.getValue().pageList)
|
||||
{
|
||||
if (page instanceof PageText)
|
||||
{
|
||||
for (Entry<ResourceLocation, EntryAbstract> entry : entries.entrySet()) {
|
||||
for (IPage page : entry.getValue().pageList) {
|
||||
if (page instanceof PageText) {
|
||||
((PageText) page).setUnicodeFlag(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,6 @@
|
|||
package WayofTime.bloodmagic.compat.guideapi.book;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe;
|
||||
import WayofTime.bloodmagic.compat.guideapi.BookUtils;
|
||||
import WayofTime.bloodmagic.compat.guideapi.entry.EntryText;
|
||||
|
@ -22,12 +13,19 @@ import amerifrance.guideapi.api.IPage;
|
|||
import amerifrance.guideapi.api.impl.abstraction.EntryAbstract;
|
||||
import amerifrance.guideapi.api.util.PageHelper;
|
||||
import amerifrance.guideapi.page.PageText;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class CategoryDemon
|
||||
{
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class CategoryDemon {
|
||||
//TODO: Add Forge recipe pages
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory()
|
||||
{
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory() {
|
||||
Map<ResourceLocation, EntryAbstract> entries = new LinkedHashMap<ResourceLocation, EntryAbstract>();
|
||||
String keyBase = "guide." + BloodMagic.MODID + ".entry.demon.";
|
||||
|
||||
|
@ -40,8 +38,7 @@ public class CategoryDemon
|
|||
snarePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "snare" + ".info.1"), 370));
|
||||
|
||||
IRecipe snareRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.SOUL_SNARE));
|
||||
if (snareRecipe != null)
|
||||
{
|
||||
if (snareRecipe != null) {
|
||||
snarePages.add(BookUtils.getPageForRecipe(snareRecipe));
|
||||
}
|
||||
|
||||
|
@ -52,8 +49,7 @@ public class CategoryDemon
|
|||
forgePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "forge" + ".info.1"), 370));
|
||||
|
||||
IRecipe forgeRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.SOUL_FORGE));
|
||||
if (forgeRecipe != null)
|
||||
{
|
||||
if (forgeRecipe != null) {
|
||||
forgePages.add(BookUtils.getPageForRecipe(forgeRecipe));
|
||||
}
|
||||
|
||||
|
@ -63,8 +59,7 @@ public class CategoryDemon
|
|||
List<IPage> pettyPages = new ArrayList<IPage>();
|
||||
pettyPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "petty" + ".info.1"), 370));
|
||||
TartaricForgeRecipe pettyRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.SOUL_GEM));
|
||||
if (pettyRecipe != null)
|
||||
{
|
||||
if (pettyRecipe != null) {
|
||||
pettyPages.add(new PageTartaricForgeRecipe(pettyRecipe));
|
||||
}
|
||||
pettyPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "petty" + ".info.2"), 370));
|
||||
|
@ -73,8 +68,7 @@ public class CategoryDemon
|
|||
List<IPage> swordPages = new ArrayList<IPage>();
|
||||
swordPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "sword" + ".info.1"), 370));
|
||||
TartaricForgeRecipe swordRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.SENTIENT_SWORD));
|
||||
if (swordRecipe != null)
|
||||
{
|
||||
if (swordRecipe != null) {
|
||||
swordPages.add(new PageTartaricForgeRecipe(swordRecipe));
|
||||
}
|
||||
swordPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "sword" + ".info.2"), 370));
|
||||
|
@ -83,8 +77,7 @@ public class CategoryDemon
|
|||
List<IPage> lesserPages = new ArrayList<IPage>();
|
||||
lesserPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "lesser" + ".info.1"), 370));
|
||||
TartaricForgeRecipe lesserRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.SOUL_GEM, 1, 1));
|
||||
if (lesserRecipe != null)
|
||||
{
|
||||
if (lesserRecipe != null) {
|
||||
lesserPages.add(new PageTartaricForgeRecipe(lesserRecipe));
|
||||
}
|
||||
lesserPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "lesser" + ".info.2"), 370));
|
||||
|
@ -101,29 +94,24 @@ public class CategoryDemon
|
|||
|
||||
List<IPage> routingPages = new ArrayList<IPage>();
|
||||
TartaricForgeRecipe nodeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.ITEM_ROUTING_NODE));
|
||||
if (nodeRecipe != null)
|
||||
{
|
||||
if (nodeRecipe != null) {
|
||||
routingPages.add(new PageTartaricForgeRecipe(nodeRecipe));
|
||||
}
|
||||
TartaricForgeRecipe inputNodeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.INPUT_ROUTING_NODE));
|
||||
if (inputNodeRecipe != null)
|
||||
{
|
||||
if (inputNodeRecipe != null) {
|
||||
routingPages.add(new PageTartaricForgeRecipe(inputNodeRecipe));
|
||||
}
|
||||
TartaricForgeRecipe outputNodeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.OUTPUT_ROUTING_NODE));
|
||||
if (outputNodeRecipe != null)
|
||||
{
|
||||
if (outputNodeRecipe != null) {
|
||||
routingPages.add(new PageTartaricForgeRecipe(outputNodeRecipe));
|
||||
}
|
||||
TartaricForgeRecipe masterNodeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.MASTER_ROUTING_NODE));
|
||||
if (masterNodeRecipe != null)
|
||||
{
|
||||
if (masterNodeRecipe != null) {
|
||||
routingPages.add(new PageTartaricForgeRecipe(masterNodeRecipe));
|
||||
}
|
||||
|
||||
TartaricForgeRecipe nodeRouterRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.NODE_ROUTER));
|
||||
if (nodeRouterRecipe != null)
|
||||
{
|
||||
if (nodeRouterRecipe != null) {
|
||||
routingPages.add(new PageTartaricForgeRecipe(nodeRouterRecipe));
|
||||
}
|
||||
|
||||
|
@ -143,8 +131,7 @@ public class CategoryDemon
|
|||
List<IPage> cruciblePages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe crucibleRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.DEMON_CRUCIBLE));
|
||||
if (crucibleRecipe != null)
|
||||
{
|
||||
if (crucibleRecipe != null) {
|
||||
cruciblePages.add(new PageTartaricForgeRecipe(crucibleRecipe));
|
||||
}
|
||||
|
||||
|
@ -154,8 +141,7 @@ public class CategoryDemon
|
|||
List<IPage> crystallizerPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe crystallizerRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.DEMON_CRYSTALLIZER));
|
||||
if (crystallizerRecipe != null)
|
||||
{
|
||||
if (crystallizerRecipe != null) {
|
||||
crystallizerPages.add(new PageTartaricForgeRecipe(crystallizerRecipe));
|
||||
}
|
||||
|
||||
|
@ -165,8 +151,7 @@ public class CategoryDemon
|
|||
List<IPage> clusterPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe clusterRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.DEMON_CRYSTAL));
|
||||
if (clusterRecipe != null)
|
||||
{
|
||||
if (clusterRecipe != null) {
|
||||
clusterPages.add(new PageTartaricForgeRecipe(clusterRecipe));
|
||||
}
|
||||
|
||||
|
@ -176,8 +161,7 @@ public class CategoryDemon
|
|||
List<IPage> pylonPages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe pylonRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.DEMON_PYLON));
|
||||
if (pylonRecipe != null)
|
||||
{
|
||||
if (pylonRecipe != null) {
|
||||
pylonPages.add(new PageTartaricForgeRecipe(pylonRecipe));
|
||||
}
|
||||
|
||||
|
@ -187,20 +171,16 @@ public class CategoryDemon
|
|||
List<IPage> gaugePages = new ArrayList<IPage>();
|
||||
|
||||
TartaricForgeRecipe gaugeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.DEMON_WILL_GAUGE));
|
||||
if (gaugeRecipe != null)
|
||||
{
|
||||
if (gaugeRecipe != null) {
|
||||
gaugePages.add(new PageTartaricForgeRecipe(gaugeRecipe));
|
||||
}
|
||||
|
||||
gaugePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "gauge" + ".info"), 370));
|
||||
entries.put(new ResourceLocation(keyBase + "gauge"), new EntryText(gaugePages, TextHelper.localize(keyBase + "gauge"), true));
|
||||
|
||||
for (Entry<ResourceLocation, EntryAbstract> entry : entries.entrySet())
|
||||
{
|
||||
for (IPage page : entry.getValue().pageList)
|
||||
{
|
||||
if (page instanceof PageText)
|
||||
{
|
||||
for (Entry<ResourceLocation, EntryAbstract> entry : entries.entrySet()) {
|
||||
for (IPage page : entry.getValue().pageList) {
|
||||
if (page instanceof PageText) {
|
||||
((PageText) page).setUnicodeFlag(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,6 @@
|
|||
package WayofTime.bloodmagic.compat.guideapi.book;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry.AltarRecipe;
|
||||
import WayofTime.bloodmagic.api.ritual.EnumRuneType;
|
||||
import WayofTime.bloodmagic.compat.guideapi.BookUtils;
|
||||
|
@ -23,13 +14,20 @@ import amerifrance.guideapi.api.IPage;
|
|||
import amerifrance.guideapi.api.impl.abstraction.EntryAbstract;
|
||||
import amerifrance.guideapi.api.util.PageHelper;
|
||||
import amerifrance.guideapi.page.PageText;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class CategoryRitual
|
||||
{
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class CategoryRitual {
|
||||
static String keyBase = "guide." + BloodMagic.MODID + ".entry.ritual.";
|
||||
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory()
|
||||
{
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory() {
|
||||
Map<ResourceLocation, EntryAbstract> entries = new LinkedHashMap<ResourceLocation, EntryAbstract>();
|
||||
|
||||
addRitualPagesToEntries("intro", entries);
|
||||
|
@ -38,19 +36,16 @@ public class CategoryRitual
|
|||
List<IPage> ritualStonePages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe ritualStoneRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.RITUAL_STONE));
|
||||
if (ritualStoneRecipe != null)
|
||||
{
|
||||
if (ritualStoneRecipe != null) {
|
||||
ritualStonePages.add(BookUtils.getPageForRecipe(ritualStoneRecipe));
|
||||
}
|
||||
|
||||
ritualStonePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "ritualStone" + ".info.1"), 370));
|
||||
|
||||
for (int i = 1; i < 5; i++)
|
||||
{
|
||||
for (int i = 1; i < 5; i++) {
|
||||
EnumRuneType type = EnumRuneType.values()[i];
|
||||
AltarRecipe scribeRecipe = RecipeHelper.getAltarRecipeForOutput(type.getScribeStack());
|
||||
if (scribeRecipe != null)
|
||||
{
|
||||
if (scribeRecipe != null) {
|
||||
ritualStonePages.add(new PageAltarRecipe(scribeRecipe));
|
||||
}
|
||||
}
|
||||
|
@ -61,8 +56,7 @@ public class CategoryRitual
|
|||
List<IPage> masterRitualStonePages = new ArrayList<IPage>();
|
||||
|
||||
IRecipe masterRitualStoneRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.RITUAL_CONTROLLER, 1, 0));
|
||||
if (masterRitualStoneRecipe != null)
|
||||
{
|
||||
if (masterRitualStoneRecipe != null) {
|
||||
masterRitualStonePages.add(BookUtils.getPageForRecipe(masterRitualStoneRecipe));
|
||||
}
|
||||
|
||||
|
@ -74,8 +68,7 @@ public class CategoryRitual
|
|||
activationCrystalPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "activationCrystal" + ".info.1"), 370));
|
||||
|
||||
AltarRecipe crystalRecipe = RecipeHelper.getAltarRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.ACTIVATION_CRYSTAL));
|
||||
if (crystalRecipe != null)
|
||||
{
|
||||
if (crystalRecipe != null) {
|
||||
activationCrystalPages.add(new PageAltarRecipe(crystalRecipe));
|
||||
}
|
||||
|
||||
|
@ -87,8 +80,7 @@ public class CategoryRitual
|
|||
divinerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "diviner" + ".info.1"), 370));
|
||||
|
||||
IRecipe divinerRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.RITUAL_DIVINER));
|
||||
if (divinerRecipe != null)
|
||||
{
|
||||
if (divinerRecipe != null) {
|
||||
divinerPages.add(BookUtils.getPageForRecipe(divinerRecipe));
|
||||
}
|
||||
|
||||
|
@ -116,12 +108,9 @@ public class CategoryRitual
|
|||
addRitualPagesToEntries("meteor", entries);
|
||||
addRitualPagesToEntries("downgrade", entries);
|
||||
|
||||
for (Entry<ResourceLocation, EntryAbstract> entry : entries.entrySet())
|
||||
{
|
||||
for (IPage page : entry.getValue().pageList)
|
||||
{
|
||||
if (page instanceof PageText)
|
||||
{
|
||||
for (Entry<ResourceLocation, EntryAbstract> entry : entries.entrySet()) {
|
||||
for (IPage page : entry.getValue().pageList) {
|
||||
if (page instanceof PageText) {
|
||||
((PageText) page).setUnicodeFlag(true);
|
||||
}
|
||||
}
|
||||
|
@ -130,8 +119,7 @@ public class CategoryRitual
|
|||
return entries;
|
||||
}
|
||||
|
||||
public static void addRitualPagesToEntries(String name, Map<ResourceLocation, EntryAbstract> entries)
|
||||
{
|
||||
public static void addRitualPagesToEntries(String name, Map<ResourceLocation, EntryAbstract> entries) {
|
||||
List<IPage> pages = new ArrayList<IPage>();
|
||||
pages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + name + ".info"), 370));
|
||||
entries.put(new ResourceLocation(keyBase + name), new EntryText(pages, TextHelper.localize(keyBase + name), true));
|
||||
|
|
|
@ -4,14 +4,11 @@ import WayofTime.bloodmagic.api.Constants;
|
|||
import amerifrance.guideapi.api.impl.abstraction.EntryAbstract;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class CategorySpell
|
||||
{
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory()
|
||||
{
|
||||
public class CategorySpell {
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory() {
|
||||
Map<ResourceLocation, EntryAbstract> entries = new LinkedHashMap<ResourceLocation, EntryAbstract>();
|
||||
String keyBase = Constants.Mod.DOMAIN + "spell_";
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import amerifrance.guideapi.entry.EntryResourceLocation;
|
|||
import amerifrance.guideapi.gui.GuiBase;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -16,23 +15,19 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class EntryText extends EntryResourceLocation
|
||||
{
|
||||
public class EntryText extends EntryResourceLocation {
|
||||
|
||||
public EntryText(List<IPage> pageList, String unlocEntryName, boolean unicode)
|
||||
{
|
||||
public EntryText(List<IPage> pageList, String unlocEntryName, boolean unicode) {
|
||||
super(pageList, unlocEntryName, new ResourceLocation("bloodmagicguide", "textures/gui/bullet_point.png"), unicode);
|
||||
}
|
||||
|
||||
public EntryText(List<IPage> pageList, String unlocEntryName)
|
||||
{
|
||||
public EntryText(List<IPage> pageList, String unlocEntryName) {
|
||||
this(pageList, unlocEntryName, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void drawExtras(Book book, CategoryAbstract category, int entryX, int entryY, int entryWidth, int entryHeight, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRendererObj)
|
||||
{
|
||||
public void drawExtras(Book book, CategoryAbstract category, int entryX, int entryY, int entryWidth, int entryHeight, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRendererObj) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(image);
|
||||
GuiHelper.drawSizedIconWithoutColor(entryX + 4, entryY + 2, 8, 8, 1F);
|
||||
|
||||
|
@ -46,8 +41,7 @@ public class EntryText extends EntryResourceLocation
|
|||
if (strWidth > guiBase.xSize - 80 && strWidth > fontRendererObj.getStringWidth("..."))
|
||||
cutString = true;
|
||||
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, entryX, entryY, entryWidth, entryHeight) && cutString)
|
||||
{
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, entryX, entryY, entryWidth, entryHeight) && cutString) {
|
||||
|
||||
guiBase.drawHoveringText(Collections.singletonList(getLocalizedName()), entryX, entryY + 12);
|
||||
fontRendererObj.setUnicodeFlag(unicode);
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
package WayofTime.bloodmagic.compat.guideapi.page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import amerifrance.guideapi.api.impl.Book;
|
||||
import amerifrance.guideapi.api.impl.Page;
|
||||
|
@ -19,15 +7,24 @@ import amerifrance.guideapi.api.impl.abstraction.CategoryAbstract;
|
|||
import amerifrance.guideapi.api.impl.abstraction.EntryAbstract;
|
||||
import amerifrance.guideapi.api.util.GuiHelper;
|
||||
import amerifrance.guideapi.gui.GuiBase;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class PageAlchemyArray extends Page
|
||||
{
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class PageAlchemyArray extends Page {
|
||||
public static final double scale = 58d / 256d;
|
||||
public List<ResourceLocation> arrayResources = new ArrayList<ResourceLocation>();
|
||||
public final ItemStack inputStack;
|
||||
public final ItemStack catalystStack;
|
||||
|
||||
public final ItemStack outputStack;
|
||||
public List<ResourceLocation> arrayResources = new ArrayList<ResourceLocation>();
|
||||
|
||||
public PageAlchemyArray(List<ResourceLocation> arrayResources, ItemStack inputStack, ItemStack catalystStack, ItemStack outputStack) {
|
||||
this.arrayResources = arrayResources;
|
||||
|
@ -36,25 +33,21 @@ public class PageAlchemyArray extends Page
|
|||
this.outputStack = outputStack;
|
||||
}
|
||||
|
||||
public PageAlchemyArray(List<ResourceLocation> resources, ItemStack inputStack, ItemStack catalystStack)
|
||||
{
|
||||
public PageAlchemyArray(List<ResourceLocation> resources, ItemStack inputStack, ItemStack catalystStack) {
|
||||
this(resources, inputStack, catalystStack, ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
public PageAlchemyArray(ResourceLocation resource, ItemStack inputStack, ItemStack catalystStack, ItemStack outputStack)
|
||||
{
|
||||
public PageAlchemyArray(ResourceLocation resource, ItemStack inputStack, ItemStack catalystStack, ItemStack outputStack) {
|
||||
this(Collections.singletonList(resource), inputStack, catalystStack, outputStack);
|
||||
}
|
||||
|
||||
public PageAlchemyArray(ResourceLocation resource, ItemStack inputStack, ItemStack catalystStack)
|
||||
{
|
||||
public PageAlchemyArray(ResourceLocation resource, ItemStack inputStack, ItemStack catalystStack) {
|
||||
this(Collections.singletonList(resource), inputStack, catalystStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer)
|
||||
{
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
||||
int x = guiLeft + 65;
|
||||
int y = guiTop + 30;
|
||||
|
||||
|
@ -63,8 +56,7 @@ public class PageAlchemyArray extends Page
|
|||
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.bloodmagic.page.alchemyArray"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
||||
|
||||
for (ResourceLocation arrayResource : arrayResources)
|
||||
{
|
||||
for (ResourceLocation arrayResource : arrayResources) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(arrayResource);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x + 2, y + 28, 0);
|
||||
|
@ -81,24 +73,20 @@ public class PageAlchemyArray extends Page
|
|||
int catalystY = y + 3;
|
||||
GuiHelper.drawItemStack(catalystStack, catalystX, catalystY);
|
||||
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15))
|
||||
{
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) {
|
||||
guiBase.renderToolTip(inputStack, mouseX, mouseY);
|
||||
}
|
||||
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, catalystX, catalystY, 15, 15))
|
||||
{
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, catalystX, catalystY, 15, 15)) {
|
||||
guiBase.renderToolTip(catalystStack, mouseX, mouseY);
|
||||
}
|
||||
|
||||
if (!outputStack.isEmpty())
|
||||
{
|
||||
if (!outputStack.isEmpty()) {
|
||||
int outputX = x + 43;
|
||||
int outputY = y + 95;
|
||||
|
||||
GuiHelper.drawItemStack(outputStack, outputX, outputY);
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15))
|
||||
{
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) {
|
||||
guiBase.renderToolTip(outputStack, mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,16 +20,14 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class PageAltarRecipe extends Page
|
||||
{
|
||||
public class PageAltarRecipe extends Page {
|
||||
|
||||
public List<ItemStack> input;
|
||||
public ItemStack output;
|
||||
public int tier;
|
||||
public int bloodRequired;
|
||||
|
||||
public PageAltarRecipe(AltarRecipeRegistry.AltarRecipe recipe)
|
||||
{
|
||||
public PageAltarRecipe(AltarRecipeRegistry.AltarRecipe recipe) {
|
||||
this.input = ItemStackWrapper.toStackList(recipe.getInput());
|
||||
this.output = recipe.getOutput();
|
||||
this.tier = recipe.getMinTier().toInt();
|
||||
|
@ -38,8 +36,7 @@ public class PageAltarRecipe extends Page
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer)
|
||||
{
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/altar.png"));
|
||||
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 146, 104);
|
||||
|
||||
|
@ -48,25 +45,21 @@ public class PageAltarRecipe extends Page
|
|||
int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7) + 1;
|
||||
int inputY = (20) + (guiTop + guiBase.ySize / 5) - 1; //1 * 20
|
||||
GuiHelper.drawItemStack(input.get(0), inputX, inputY);
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15))
|
||||
{
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) {
|
||||
guiBase.renderToolTip(input.get(0), mouseX, mouseY);
|
||||
}
|
||||
|
||||
if (output.isEmpty())
|
||||
{
|
||||
if (output.isEmpty()) {
|
||||
output = new ItemStack(Blocks.BARRIER);
|
||||
}
|
||||
int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7) + 1;
|
||||
int outputY = (20) + (guiTop + guiBase.xSize / 5) - 1; // 1 * 20
|
||||
GuiHelper.drawItemStack(output, outputX, outputY);
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15))
|
||||
{
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) {
|
||||
guiBase.renderToolTip(output, outputX, outputY);
|
||||
}
|
||||
|
||||
if (output.getItem() == Item.getItemFromBlock(Blocks.BARRIER))
|
||||
{
|
||||
if (output.getItem() == Item.getItemFromBlock(Blocks.BARRIER)) {
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("text.furnace.error"), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0xED073D);
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("bm.string.tier") + ": " + String.valueOf(tier), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0);
|
||||
guiBase.drawCenteredString(fontRenderer, "LP: " + String.valueOf(bloodRequired), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 30, 0);
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
package WayofTime.bloodmagic.compat.guideapi.page;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe;
|
||||
import WayofTime.bloodmagic.api.registry.OrbRegistry;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
@ -21,9 +9,20 @@ import amerifrance.guideapi.api.impl.abstraction.CategoryAbstract;
|
|||
import amerifrance.guideapi.api.impl.abstraction.EntryAbstract;
|
||||
import amerifrance.guideapi.api.util.GuiHelper;
|
||||
import amerifrance.guideapi.gui.GuiBase;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class PageTartaricForgeRecipe extends Page
|
||||
{
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class PageTartaricForgeRecipe extends Page {
|
||||
public List<Object> input;
|
||||
public ItemStack output;
|
||||
public int tier;
|
||||
|
@ -33,8 +32,7 @@ public class PageTartaricForgeRecipe extends Page
|
|||
private int cycleIdx = 0;
|
||||
private Random rand = new Random();
|
||||
|
||||
public PageTartaricForgeRecipe(TartaricForgeRecipe recipe)
|
||||
{
|
||||
public PageTartaricForgeRecipe(TartaricForgeRecipe recipe) {
|
||||
this.input = recipe.getInput();
|
||||
this.output = recipe.getRecipeOutput();
|
||||
this.tier = 0;
|
||||
|
@ -45,8 +43,7 @@ public class PageTartaricForgeRecipe extends Page
|
|||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer)
|
||||
{
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/soulForge.png"));
|
||||
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 146, 104);
|
||||
|
||||
|
@ -55,49 +52,38 @@ public class PageTartaricForgeRecipe extends Page
|
|||
// int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7) + 1;
|
||||
// int inputY = (20) + (guiTop + guiBase.ySize / 5) - 1; //1 * 20
|
||||
|
||||
for (int y = 0; y < 2; y++)
|
||||
{
|
||||
for (int x = 0; x < 2; x++)
|
||||
{
|
||||
for (int y = 0; y < 2; y++) {
|
||||
for (int x = 0; x < 2; x++) {
|
||||
int stackX = (x + 1) * 20 + (guiLeft + guiBase.xSize / 7) + 1;
|
||||
int stackY = (y + 1) * 20 + (guiTop + guiBase.ySize / 5) - 1;
|
||||
Object component = input.size() > y * 2 + x ? input.get(y * 2 + x) : null;//recipe.getInput()[y * 2 + x];
|
||||
if (component != null)
|
||||
{
|
||||
if (component instanceof ItemStack)
|
||||
{
|
||||
if (component != null) {
|
||||
if (component instanceof ItemStack) {
|
||||
ItemStack input = (ItemStack) component;
|
||||
if (input.getItemDamage() == OreDictionary.WILDCARD_VALUE)
|
||||
input.setItemDamage(0);
|
||||
|
||||
GuiHelper.drawItemStack((ItemStack) component, stackX, stackY);
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15))
|
||||
{
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
|
||||
// tooltips = GuiHelper.getTooltip((ItemStack) component);
|
||||
guiBase.renderToolTip((ItemStack) component, mouseX, mouseY);
|
||||
}
|
||||
} else if (component instanceof Integer)
|
||||
{
|
||||
} else if (component instanceof Integer) {
|
||||
List<ItemStack> list = OrbRegistry.getOrbsDownToTier((Integer) component);
|
||||
if (!list.isEmpty())
|
||||
{
|
||||
if (!list.isEmpty()) {
|
||||
ItemStack stack = list.get(getRandomizedCycle(x + (y * 2), list.size()));
|
||||
GuiHelper.drawItemStack(stack, stackX, stackY);
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15))
|
||||
{
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
|
||||
// tooltips = GuiHelper.getTooltip(stack);
|
||||
guiBase.renderToolTip(stack, mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
List<ItemStack> list = (List<ItemStack>) component;
|
||||
if (!list.isEmpty())
|
||||
{
|
||||
if (!list.isEmpty()) {
|
||||
ItemStack stack = list.get(getRandomizedCycle(x + (y * 2), list.size()));
|
||||
GuiHelper.drawItemStack(stack, stackX, stackY);
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15))
|
||||
{
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
|
||||
// tooltips = GuiHelper.getTooltip(stack);
|
||||
guiBase.renderToolTip(stack, mouseX, mouseY);
|
||||
}
|
||||
|
@ -113,20 +99,17 @@ public class PageTartaricForgeRecipe extends Page
|
|||
// guiBase.renderToolTip(input.get(0), mouseX, mouseY);
|
||||
// }
|
||||
|
||||
if (output == null)
|
||||
{
|
||||
if (output == null) {
|
||||
output = new ItemStack(Blocks.BARRIER);
|
||||
}
|
||||
int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7) + 1;
|
||||
int outputY = (20) + (guiTop + guiBase.xSize / 5) + 10; // 1 * 20
|
||||
GuiHelper.drawItemStack(output, outputX, outputY);
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15))
|
||||
{
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) {
|
||||
guiBase.renderToolTip(output, outputX, outputY);
|
||||
}
|
||||
|
||||
if (output.getItem() == Item.getItemFromBlock(Blocks.BARRIER))
|
||||
{
|
||||
if (output.getItem() == Item.getItemFromBlock(Blocks.BARRIER)) {
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("text.furnace.error"), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0xED073D);
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("bm.string.tier") + ": " + String.valueOf(tier), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0);
|
||||
// guiBase.drawCenteredString(fontRenderer, "LP: " + String.valueOf(bloodRequired), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 30, 0);
|
||||
|
@ -135,8 +118,7 @@ public class PageTartaricForgeRecipe extends Page
|
|||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.bloodmagic.page.drainedWill", String.valueOf(drainedWill)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0);
|
||||
}
|
||||
|
||||
protected int getRandomizedCycle(int index, int max)
|
||||
{
|
||||
protected int getRandomizedCycle(int index, int max) {
|
||||
rand.setSeed(index);
|
||||
return (index + rand.nextInt(max) + cycleIdx) % max;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
package WayofTime.bloodmagic.compat.jei;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.*;
|
||||
import mezz.jei.api.recipe.IRecipeCategoryRegistration;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler;
|
||||
import WayofTime.bloodmagic.api.util.helper.ItemHelper.LivingUpgrades;
|
||||
|
@ -31,15 +24,19 @@ import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeHandler;
|
|||
import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeMaker;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicBlocks;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||
import mezz.jei.api.*;
|
||||
import mezz.jei.api.recipe.IRecipeCategoryRegistration;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Map;
|
||||
|
||||
@JEIPlugin
|
||||
public class BloodMagicPlugin extends BlankModPlugin
|
||||
{
|
||||
public class BloodMagicPlugin extends BlankModPlugin {
|
||||
public static IJeiHelpers jeiHelper;
|
||||
|
||||
@Override
|
||||
public void register(@Nonnull IModRegistry registry)
|
||||
{
|
||||
public void register(@Nonnull IModRegistry registry) {
|
||||
jeiHelper = registry.getJeiHelpers();
|
||||
|
||||
registry.addRecipeHandlers(
|
||||
|
@ -61,12 +58,10 @@ public class BloodMagicPlugin extends BlankModPlugin
|
|||
registry.addIngredientInfo(new ItemStack(RegistrarBloodMagicItems.ALTAR_MAKER), ItemStack.class, "jei.bloodmagic.desc.altarBuilder");
|
||||
registry.addIngredientInfo(new ItemStack(RegistrarBloodMagicItems.MONSTER_SOUL), ItemStack.class, "jei.bloodmagic.desc.demonicWill");
|
||||
|
||||
for (Map.Entry<String, Integer> entry : LivingArmourHandler.upgradeMaxLevelMap.entrySet())
|
||||
{
|
||||
for (Map.Entry<String, Integer> entry : LivingArmourHandler.upgradeMaxLevelMap.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
int maxLevel = entry.getValue();
|
||||
for (int i = 0; i < maxLevel - 1; i++)
|
||||
{
|
||||
for (int i = 0; i < maxLevel - 1; i++) {
|
||||
ItemStack stack = new ItemStack(RegistrarBloodMagicItems.UPGRADE_TOME);
|
||||
LivingUpgrades.setKey(stack, key);
|
||||
LivingUpgrades.setLevel(stack, i);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyArray;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
|
@ -12,12 +12,11 @@ import mezz.jei.api.recipe.IRecipeWrapper;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class AlchemyArrayCraftingCategory implements IRecipeCategory
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class AlchemyArrayCraftingCategory implements IRecipeCategory {
|
||||
private static final int INPUT_SLOT = 0;
|
||||
private static final int CATALYST_SLOT = 1;
|
||||
private static final int OUTPUT_SLOT = 2;
|
||||
|
@ -29,47 +28,40 @@ public class AlchemyArrayCraftingCategory implements IRecipeCategory
|
|||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUid()
|
||||
{
|
||||
public String getUid() {
|
||||
return Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getTitle()
|
||||
{
|
||||
public String getTitle() {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground()
|
||||
{
|
||||
public IDrawable getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft)
|
||||
{
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public IDrawable getIcon()
|
||||
{
|
||||
public IDrawable getIcon() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients)
|
||||
{
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) {
|
||||
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 0, 5);
|
||||
recipeLayout.getItemStacks().init(CATALYST_SLOT, true, 29, 3);
|
||||
recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 73, 5);
|
||||
|
||||
if (recipeWrapper instanceof AlchemyArrayCraftingRecipeJEI)
|
||||
{
|
||||
if (recipeWrapper instanceof AlchemyArrayCraftingRecipeJEI) {
|
||||
recipeLayout.getItemStacks().set(INPUT_SLOT, ingredients.getInputs(ItemStack.class).get(0));
|
||||
recipeLayout.getItemStacks().set(CATALYST_SLOT, ingredients.getInputs(ItemStack.class).get(ingredients.getInputs(ItemStack.class).size() - 1));
|
||||
recipeLayout.getItemStacks().set(OUTPUT_SLOT, ingredients.getOutputs(ItemStack.class).get(0));
|
||||
|
|
|
@ -1,36 +1,31 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyArray;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
|
||||
public class AlchemyArrayCraftingRecipeHandler implements IRecipeHandler<AlchemyArrayCraftingRecipeJEI>
|
||||
{
|
||||
public class AlchemyArrayCraftingRecipeHandler implements IRecipeHandler<AlchemyArrayCraftingRecipeJEI> {
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<AlchemyArrayCraftingRecipeJEI> getRecipeClass()
|
||||
{
|
||||
public Class<AlchemyArrayCraftingRecipeJEI> getRecipeClass() {
|
||||
return AlchemyArrayCraftingRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AlchemyArrayCraftingRecipeJEI recipe)
|
||||
{
|
||||
public String getRecipeCategoryUid(@Nonnull AlchemyArrayCraftingRecipeJEI recipe) {
|
||||
return Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AlchemyArrayCraftingRecipeJEI recipe)
|
||||
{
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AlchemyArrayCraftingRecipeJEI recipe) {
|
||||
return recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(@Nonnull AlchemyArrayCraftingRecipeJEI recipe)
|
||||
{
|
||||
public boolean isRecipeValid(@Nonnull AlchemyArrayCraftingRecipeJEI recipe) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyArray;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class AlchemyArrayCraftingRecipeJEI extends BlankRecipeWrapper
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class AlchemyArrayCraftingRecipeJEI extends BlankRecipeWrapper {
|
||||
@Nonnull
|
||||
private final List<ItemStack> inputs;
|
||||
@Nullable
|
||||
|
@ -19,15 +17,13 @@ public class AlchemyArrayCraftingRecipeJEI extends BlankRecipeWrapper
|
|||
@Nonnull
|
||||
private final ItemStack output;
|
||||
|
||||
public AlchemyArrayCraftingRecipeJEI(@Nonnull List<ItemStack> input, @Nullable ItemStack catalyst, @Nonnull ItemStack output)
|
||||
{
|
||||
public AlchemyArrayCraftingRecipeJEI(@Nonnull List<ItemStack> input, @Nullable ItemStack catalyst, @Nonnull ItemStack output) {
|
||||
this.inputs = input;
|
||||
this.catalyst = catalyst;
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
public ItemStack getCatalyst()
|
||||
{
|
||||
public ItemStack getCatalyst() {
|
||||
return catalyst;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,38 +1,31 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyArray;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.api.ItemStackWrapper;
|
||||
import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect;
|
||||
import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffectCrafting;
|
||||
import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry;
|
||||
|
||||
import com.google.common.collect.BiMap;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class AlchemyArrayCraftingRecipeMaker
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class AlchemyArrayCraftingRecipeMaker {
|
||||
@Nonnull
|
||||
public static List<AlchemyArrayCraftingRecipeJEI> getRecipes()
|
||||
{
|
||||
public static List<AlchemyArrayCraftingRecipeJEI> getRecipes() {
|
||||
Map<List<ItemStack>, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> alchemyArrayRecipeMap = AlchemyArrayRecipeRegistry.getRecipes();
|
||||
|
||||
ArrayList<AlchemyArrayCraftingRecipeJEI> recipes = new ArrayList<AlchemyArrayCraftingRecipeJEI>();
|
||||
|
||||
for (Map.Entry<List<ItemStack>, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> itemStackAlchemyArrayRecipeEntry : alchemyArrayRecipeMap.entrySet())
|
||||
{
|
||||
for (Map.Entry<List<ItemStack>, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> itemStackAlchemyArrayRecipeEntry : alchemyArrayRecipeMap.entrySet()) {
|
||||
List<ItemStack> input = itemStackAlchemyArrayRecipeEntry.getValue().getInput();
|
||||
BiMap<ItemStackWrapper, AlchemyArrayEffect> catalystMap = itemStackAlchemyArrayRecipeEntry.getValue().catalystMap;
|
||||
|
||||
for (Map.Entry<ItemStackWrapper, AlchemyArrayEffect> entry : catalystMap.entrySet())
|
||||
{
|
||||
for (Map.Entry<ItemStackWrapper, AlchemyArrayEffect> entry : catalystMap.entrySet()) {
|
||||
ItemStack catalyst = entry.getKey().toStack();
|
||||
if (AlchemyArrayRecipeRegistry.getAlchemyArrayEffect(input, catalyst) instanceof AlchemyArrayEffectCrafting)
|
||||
{
|
||||
if (AlchemyArrayRecipeRegistry.getAlchemyArrayEffect(input, catalyst) instanceof AlchemyArrayEffectCrafting) {
|
||||
ItemStack output = ((AlchemyArrayEffectCrafting) itemStackAlchemyArrayRecipeEntry.getValue().getAlchemyArrayEffectForCatalyst(catalyst)).outputStack;
|
||||
|
||||
AlchemyArrayCraftingRecipeJEI recipe = new AlchemyArrayCraftingRecipeJEI(input, catalyst, output);
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyTable;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.registry.OrbRegistry;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mezz.jei.api.gui.ICraftingGridHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
|
@ -12,12 +13,10 @@ import mezz.jei.api.ingredients.IIngredients;
|
|||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class AlchemyTableRecipeCategory extends BlankRecipeCategory<AlchemyTableRecipeJEI>
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class AlchemyTableRecipeCategory extends BlankRecipeCategory<AlchemyTableRecipeJEI> {
|
||||
private static final int OUTPUT_SLOT = 0;
|
||||
private static final int ORB_SLOT = 1;
|
||||
private static final int INPUT_SLOT = 2;
|
||||
|
@ -29,44 +28,37 @@ public class AlchemyTableRecipeCategory extends BlankRecipeCategory<AlchemyTable
|
|||
@Nonnull
|
||||
private final ICraftingGridHelper craftingGridHelper;
|
||||
|
||||
public AlchemyTableRecipeCategory()
|
||||
{
|
||||
public AlchemyTableRecipeCategory() {
|
||||
craftingGridHelper = BloodMagicPlugin.jeiHelper.getGuiHelper().createCraftingGridHelper(INPUT_SLOT, OUTPUT_SLOT);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUid()
|
||||
{
|
||||
public String getUid() {
|
||||
return Constants.Compat.JEI_CATEGORY_ALCHEMYTABLE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getTitle()
|
||||
{
|
||||
public String getTitle() {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground()
|
||||
{
|
||||
public IDrawable getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayout recipeLayout, AlchemyTableRecipeJEI recipeWrapper, IIngredients ingredients)
|
||||
{
|
||||
public void setRecipe(IRecipeLayout recipeLayout, AlchemyTableRecipeJEI recipeWrapper, IIngredients ingredients) {
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
guiItemStacks.init(OUTPUT_SLOT, false, 91, 13);
|
||||
guiItemStacks.init(ORB_SLOT, true, 60, 0);
|
||||
|
||||
for (int y = 0; y < 3; ++y)
|
||||
{
|
||||
for (int x = 0; x < 3; ++x)
|
||||
{
|
||||
for (int y = 0; y < 3; ++y) {
|
||||
for (int x = 0; x < 3; ++x) {
|
||||
int index = INPUT_SLOT + x + (y * 3);
|
||||
guiItemStacks.init(index, true, x * 18, y * 18 - 18);
|
||||
}
|
||||
|
|
|
@ -1,36 +1,31 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyTable;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
|
||||
public class AlchemyTableRecipeHandler implements IRecipeHandler<AlchemyTableRecipeJEI>
|
||||
{
|
||||
public class AlchemyTableRecipeHandler implements IRecipeHandler<AlchemyTableRecipeJEI> {
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<AlchemyTableRecipeJEI> getRecipeClass()
|
||||
{
|
||||
public Class<AlchemyTableRecipeJEI> getRecipeClass() {
|
||||
return AlchemyTableRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AlchemyTableRecipeJEI recipe)
|
||||
{
|
||||
public String getRecipeCategoryUid(@Nonnull AlchemyTableRecipeJEI recipe) {
|
||||
return Constants.Compat.JEI_CATEGORY_ALCHEMYTABLE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AlchemyTableRecipeJEI recipe)
|
||||
{
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AlchemyTableRecipeJEI recipe) {
|
||||
return recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(@Nonnull AlchemyTableRecipeJEI recipe)
|
||||
{
|
||||
public boolean isRecipeValid(@Nonnull AlchemyTableRecipeJEI recipe) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyTable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.bloodmagic.api.recipe.AlchemyTableRecipe;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.api.recipe.AlchemyTableRecipe;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class AlchemyTableRecipeJEI extends BlankRecipeWrapper
|
||||
{
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AlchemyTableRecipeJEI extends BlankRecipeWrapper {
|
||||
private AlchemyTableRecipe recipe;
|
||||
|
||||
public AlchemyTableRecipeJEI(AlchemyTableRecipe recipe)
|
||||
{
|
||||
public AlchemyTableRecipeJEI(AlchemyTableRecipe recipe) {
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
|
@ -28,11 +26,9 @@ public class AlchemyTableRecipeJEI extends BlankRecipeWrapper
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
public List<String> getTooltipStrings(int mouseX, int mouseY) {
|
||||
ArrayList<String> ret = new ArrayList<String>();
|
||||
if (mouseX >= 58 && mouseX <= 78 && mouseY >= 21 && mouseY <= 34)
|
||||
{
|
||||
if (mouseX >= 58 && mouseX <= 78 && mouseY >= 21 && mouseY <= 34) {
|
||||
ret.add(TextHelper.localize("tooltip.bloodmagic.tier", recipe.getTierRequired()));
|
||||
ret.add(TextHelper.localize("jei.bloodmagic.recipe.lpDrained", recipe.getLpDrained()));
|
||||
ret.add(TextHelper.localize("jei.bloodmagic.recipe.ticksRequired", recipe.getTicksRequired()));
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyTable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import WayofTime.bloodmagic.api.recipe.AlchemyTableRecipe;
|
||||
import WayofTime.bloodmagic.api.registry.AlchemyTableRecipeRegistry;
|
||||
|
||||
public class AlchemyTableRecipeMaker
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AlchemyTableRecipeMaker {
|
||||
@Nonnull
|
||||
public static List<AlchemyTableRecipeJEI> getRecipes()
|
||||
{
|
||||
public static List<AlchemyTableRecipeJEI> getRecipes() {
|
||||
List<AlchemyTableRecipe> recipeList = AlchemyTableRecipeRegistry.getRecipeList();
|
||||
ArrayList<AlchemyTableRecipeJEI> recipes = new ArrayList<AlchemyTableRecipeJEI>();
|
||||
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package WayofTime.bloodmagic.compat.jei.altar;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
|
@ -14,12 +12,11 @@ import mezz.jei.api.recipe.IRecipeWrapper;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class AltarRecipeCategory implements IRecipeCategory
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class AltarRecipeCategory implements IRecipeCategory {
|
||||
private static final int INPUT_SLOT = 0;
|
||||
private static final int OUTPUT_SLOT = 1;
|
||||
|
||||
|
@ -30,28 +27,24 @@ public class AltarRecipeCategory implements IRecipeCategory
|
|||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUid()
|
||||
{
|
||||
public String getUid() {
|
||||
return Constants.Compat.JEI_CATEGORY_ALTAR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getTitle()
|
||||
{
|
||||
public String getTitle() {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground()
|
||||
{
|
||||
public IDrawable getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft)
|
||||
{
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -62,13 +55,11 @@ public class AltarRecipeCategory implements IRecipeCategory
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients)
|
||||
{
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) {
|
||||
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 31, 0);
|
||||
recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 125, 30);
|
||||
|
||||
if (recipeWrapper instanceof AltarRecipeJEI)
|
||||
{
|
||||
if (recipeWrapper instanceof AltarRecipeJEI) {
|
||||
recipeLayout.getItemStacks().set(INPUT_SLOT, ingredients.getInputs(ItemStack.class).get(0));
|
||||
recipeLayout.getItemStacks().set(OUTPUT_SLOT, ingredients.getOutputs(ItemStack.class).get(0));
|
||||
}
|
||||
|
|
|
@ -1,36 +1,31 @@
|
|||
package WayofTime.bloodmagic.compat.jei.altar;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
|
||||
public class AltarRecipeHandler implements IRecipeHandler<AltarRecipeJEI>
|
||||
{
|
||||
public class AltarRecipeHandler implements IRecipeHandler<AltarRecipeJEI> {
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<AltarRecipeJEI> getRecipeClass()
|
||||
{
|
||||
public Class<AltarRecipeJEI> getRecipeClass() {
|
||||
return AltarRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AltarRecipeJEI recipe)
|
||||
{
|
||||
public String getRecipeCategoryUid(@Nonnull AltarRecipeJEI recipe) {
|
||||
return Constants.Compat.JEI_CATEGORY_ALTAR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AltarRecipeJEI recipe)
|
||||
{
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AltarRecipeJEI recipe) {
|
||||
return recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(@Nonnull AltarRecipeJEI recipe)
|
||||
{
|
||||
public boolean isRecipeValid(@Nonnull AltarRecipeJEI recipe) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
package WayofTime.bloodmagic.compat.jei.altar;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import WayofTime.bloodmagic.util.helper.NumeralHelper;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class AltarRecipeJEI extends BlankRecipeWrapper
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AltarRecipeJEI extends BlankRecipeWrapper {
|
||||
@Nonnull
|
||||
private final List<ItemStack> input;
|
||||
@Nonnull
|
||||
|
@ -24,12 +22,11 @@ public class AltarRecipeJEI extends BlankRecipeWrapper
|
|||
private final int consumptionRate;
|
||||
private final int drainRate;
|
||||
|
||||
public AltarRecipeJEI(@Nonnull List<ItemStack> input, @Nonnull ItemStack output, int tier, int requiredLP, int consumptionRate, int drainRate)
|
||||
{
|
||||
public AltarRecipeJEI(@Nonnull List<ItemStack> input, @Nonnull ItemStack output, int tier, int requiredLP, int consumptionRate, int drainRate) {
|
||||
this.input = input;
|
||||
this.output = output;
|
||||
|
||||
this.infoString = new String[] { TextHelper.localize("jei.bloodmagic.recipe.requiredTier", NumeralHelper.toRoman(tier)), TextHelper.localize("jei.bloodmagic.recipe.requiredLP", requiredLP) };
|
||||
this.infoString = new String[]{TextHelper.localize("jei.bloodmagic.recipe.requiredTier", NumeralHelper.toRoman(tier)), TextHelper.localize("jei.bloodmagic.recipe.requiredLP", requiredLP)};
|
||||
this.consumptionRate = consumptionRate;
|
||||
this.drainRate = drainRate;
|
||||
}
|
||||
|
@ -41,11 +38,9 @@ public class AltarRecipeJEI extends BlankRecipeWrapper
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
public List<String> getTooltipStrings(int mouseX, int mouseY) {
|
||||
ArrayList<String> ret = new ArrayList<String>();
|
||||
if (mouseX >= 13 && mouseX <= 64 && mouseY >= 27 && mouseY <= 58)
|
||||
{
|
||||
if (mouseX >= 13 && mouseX <= 64 && mouseY >= 27 && mouseY <= 58) {
|
||||
ret.add(TextHelper.localize("jei.bloodmagic.recipe.consumptionRate", consumptionRate));
|
||||
ret.add(TextHelper.localize("jei.bloodmagic.recipe.drainRate", drainRate));
|
||||
}
|
||||
|
@ -53,8 +48,7 @@ public class AltarRecipeJEI extends BlankRecipeWrapper
|
|||
}
|
||||
|
||||
@Override
|
||||
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY)
|
||||
{
|
||||
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {
|
||||
minecraft.fontRenderer.drawString(infoString[0], 90 - minecraft.fontRenderer.getStringWidth(infoString[0]) / 2, 0, Color.gray.getRGB());
|
||||
minecraft.fontRenderer.drawString(infoString[1], 90 - minecraft.fontRenderer.getStringWidth(infoString[1]) / 2, 10, Color.gray.getRGB());
|
||||
}
|
||||
|
|
|
@ -1,35 +1,30 @@
|
|||
package WayofTime.bloodmagic.compat.jei.altar;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import WayofTime.bloodmagic.api.ItemStackWrapper;
|
||||
import WayofTime.bloodmagic.block.BlockLifeEssence;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.api.orb.IBloodOrb;
|
||||
import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry;
|
||||
import WayofTime.bloodmagic.block.BlockLifeEssence;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeModContainer;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidUtil;
|
||||
|
||||
public class AltarRecipeMaker
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class AltarRecipeMaker {
|
||||
@Nonnull
|
||||
public static List<AltarRecipeJEI> getRecipes()
|
||||
{
|
||||
public static List<AltarRecipeJEI> getRecipes() {
|
||||
Map<List<ItemStackWrapper>, AltarRecipeRegistry.AltarRecipe> altarMap = AltarRecipeRegistry.getRecipes();
|
||||
|
||||
ArrayList<AltarRecipeJEI> recipes = new ArrayList<AltarRecipeJEI>();
|
||||
|
||||
for (Map.Entry<List<ItemStackWrapper>, AltarRecipeRegistry.AltarRecipe> itemStackAltarRecipeEntry : altarMap.entrySet())
|
||||
{
|
||||
for (Map.Entry<List<ItemStackWrapper>, AltarRecipeRegistry.AltarRecipe> itemStackAltarRecipeEntry : altarMap.entrySet()) {
|
||||
// Make sure input is not a Blood Orb. If it is, the recipe is for a filling orb, and we don't want that.
|
||||
if (!(itemStackAltarRecipeEntry.getKey().get(0).toStack().getItem() instanceof IBloodOrb))
|
||||
{
|
||||
if (!(itemStackAltarRecipeEntry.getKey().get(0).toStack().getItem() instanceof IBloodOrb)) {
|
||||
List<ItemStack> input = ItemStackWrapper.toStackList(itemStackAltarRecipeEntry.getValue().getInput());
|
||||
ItemStack output = itemStackAltarRecipeEntry.getValue().getOutput();
|
||||
int requiredTier = itemStackAltarRecipeEntry.getValue().getMinTier().toInt();
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.bloodmagic.compat.jei.armourDowngrade;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mezz.jei.api.gui.ICraftingGridHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
|
@ -14,12 +14,11 @@ import mezz.jei.api.recipe.IRecipeWrapper;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class ArmourDowngradeRecipeCategory implements IRecipeCategory
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ArmourDowngradeRecipeCategory implements IRecipeCategory {
|
||||
private static final int OUTPUT_SLOT = 0;
|
||||
private static final int KEY_SLOT = 1;
|
||||
private static final int INPUT_SLOT = 2;
|
||||
|
@ -31,35 +30,30 @@ public class ArmourDowngradeRecipeCategory implements IRecipeCategory
|
|||
@Nonnull
|
||||
private final ICraftingGridHelper craftingGridHelper;
|
||||
|
||||
public ArmourDowngradeRecipeCategory()
|
||||
{
|
||||
public ArmourDowngradeRecipeCategory() {
|
||||
craftingGridHelper = BloodMagicPlugin.jeiHelper.getGuiHelper().createCraftingGridHelper(INPUT_SLOT, OUTPUT_SLOT);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUid()
|
||||
{
|
||||
public String getUid() {
|
||||
return Constants.Compat.JEI_CATEGORY_ARMOURDOWNGRADE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getTitle()
|
||||
{
|
||||
public String getTitle() {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground()
|
||||
{
|
||||
public IDrawable getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft)
|
||||
{
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -71,24 +65,20 @@ public class ArmourDowngradeRecipeCategory implements IRecipeCategory
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper, IIngredients ingredients)
|
||||
{
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper, IIngredients ingredients) {
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
guiItemStacks.init(OUTPUT_SLOT, false, 91, 13);
|
||||
guiItemStacks.init(KEY_SLOT, true, 60, 0);
|
||||
|
||||
for (int y = 0; y < 3; ++y)
|
||||
{
|
||||
for (int x = 0; x < 3; ++x)
|
||||
{
|
||||
for (int y = 0; y < 3; ++y) {
|
||||
for (int x = 0; x < 3; ++x) {
|
||||
int index = INPUT_SLOT + x + (y * 3);
|
||||
guiItemStacks.init(index, true, x * 18, y * 18 - 18);
|
||||
}
|
||||
}
|
||||
|
||||
if (recipeWrapper instanceof ArmourDowngradeRecipeJEI)
|
||||
{
|
||||
if (recipeWrapper instanceof ArmourDowngradeRecipeJEI) {
|
||||
guiItemStacks.set(KEY_SLOT, ingredients.getInputs(ItemStack.class).get(ingredients.getInputs(ItemStack.class).size() - 1));
|
||||
ingredients.getInputs(ItemStack.class).remove(ingredients.getInputs(ItemStack.class).size() - 1);
|
||||
guiItemStacks.set(OUTPUT_SLOT, ingredients.getOutputs(ItemStack.class).get(0));
|
||||
|
|
|
@ -1,37 +1,32 @@
|
|||
package WayofTime.bloodmagic.compat.jei.armourDowngrade;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
|
||||
public class ArmourDowngradeRecipeHandler implements IRecipeHandler<ArmourDowngradeRecipeJEI>
|
||||
{
|
||||
public class ArmourDowngradeRecipeHandler implements IRecipeHandler<ArmourDowngradeRecipeJEI> {
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<ArmourDowngradeRecipeJEI> getRecipeClass()
|
||||
{
|
||||
public Class<ArmourDowngradeRecipeJEI> getRecipeClass() {
|
||||
return ArmourDowngradeRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(ArmourDowngradeRecipeJEI recipe)
|
||||
{
|
||||
public String getRecipeCategoryUid(ArmourDowngradeRecipeJEI recipe) {
|
||||
return Constants.Compat.JEI_CATEGORY_ARMOURDOWNGRADE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull ArmourDowngradeRecipeJEI recipe)
|
||||
{
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull ArmourDowngradeRecipeJEI recipe) {
|
||||
return recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(@Nonnull ArmourDowngradeRecipeJEI recipe)
|
||||
{
|
||||
public boolean isRecipeValid(@Nonnull ArmourDowngradeRecipeJEI recipe) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
package WayofTime.bloodmagic.compat.jei.armourDowngrade;
|
||||
|
||||
import WayofTime.bloodmagic.api.recipe.LivingArmourDowngradeRecipe;
|
||||
import WayofTime.bloodmagic.api.util.helper.ItemHelper.LivingUpgrades;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||
import com.google.common.collect.Lists;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.api.recipe.LivingArmourDowngradeRecipe;
|
||||
import WayofTime.bloodmagic.api.util.helper.ItemHelper.LivingUpgrades;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ArmourDowngradeRecipeJEI extends BlankRecipeWrapper
|
||||
{
|
||||
public class ArmourDowngradeRecipeJEI extends BlankRecipeWrapper {
|
||||
private LivingArmourDowngradeRecipe recipe;
|
||||
|
||||
public ArmourDowngradeRecipeJEI(LivingArmourDowngradeRecipe recipe)
|
||||
{
|
||||
public ArmourDowngradeRecipeJEI(LivingArmourDowngradeRecipe recipe) {
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
package WayofTime.bloodmagic.compat.jei.armourDowngrade;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import WayofTime.bloodmagic.api.recipe.LivingArmourDowngradeRecipe;
|
||||
import WayofTime.bloodmagic.api.registry.LivingArmourDowngradeRecipeRegistry;
|
||||
|
||||
public class ArmourDowngradeRecipeMaker
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ArmourDowngradeRecipeMaker {
|
||||
@Nonnull
|
||||
public static List<ArmourDowngradeRecipeJEI> getRecipes()
|
||||
{
|
||||
public static List<ArmourDowngradeRecipeJEI> getRecipes() {
|
||||
List<LivingArmourDowngradeRecipe> recipeList = LivingArmourDowngradeRecipeRegistry.getRecipeList();
|
||||
ArrayList<ArmourDowngradeRecipeJEI> recipes = new ArrayList<ArmourDowngradeRecipeJEI>();
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.bloodmagic.compat.jei.binding;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
|
@ -12,12 +12,11 @@ import mezz.jei.api.recipe.IRecipeWrapper;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class BindingRecipeCategory implements IRecipeCategory
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BindingRecipeCategory implements IRecipeCategory {
|
||||
private static final int INPUT_SLOT = 0;
|
||||
private static final int CATALYST_SLOT = 1;
|
||||
private static final int OUTPUT_SLOT = 2;
|
||||
|
@ -29,28 +28,24 @@ public class BindingRecipeCategory implements IRecipeCategory
|
|||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUid()
|
||||
{
|
||||
public String getUid() {
|
||||
return Constants.Compat.JEI_CATEGORY_BINDING;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getTitle()
|
||||
{
|
||||
public String getTitle() {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground()
|
||||
{
|
||||
public IDrawable getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft)
|
||||
{
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -66,8 +61,7 @@ public class BindingRecipeCategory implements IRecipeCategory
|
|||
recipeLayout.getItemStacks().init(CATALYST_SLOT, true, 29, 3);
|
||||
recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 73, 5);
|
||||
|
||||
if (recipeWrapper instanceof BindingRecipeJEI)
|
||||
{
|
||||
if (recipeWrapper instanceof BindingRecipeJEI) {
|
||||
recipeLayout.getItemStacks().set(INPUT_SLOT, ingredients.getInputs(ItemStack.class).get(0));
|
||||
recipeLayout.getItemStacks().set(CATALYST_SLOT, ingredients.getInputs(ItemStack.class).get(1));
|
||||
recipeLayout.getItemStacks().set(OUTPUT_SLOT, ingredients.getOutputs(ItemStack.class).get(0));
|
||||
|
|
|
@ -1,36 +1,31 @@
|
|||
package WayofTime.bloodmagic.compat.jei.binding;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
|
||||
public class BindingRecipeHandler implements IRecipeHandler<BindingRecipeJEI>
|
||||
{
|
||||
public class BindingRecipeHandler implements IRecipeHandler<BindingRecipeJEI> {
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<BindingRecipeJEI> getRecipeClass()
|
||||
{
|
||||
public Class<BindingRecipeJEI> getRecipeClass() {
|
||||
return BindingRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull BindingRecipeJEI recipe)
|
||||
{
|
||||
public String getRecipeCategoryUid(@Nonnull BindingRecipeJEI recipe) {
|
||||
return Constants.Compat.JEI_CATEGORY_BINDING;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull BindingRecipeJEI recipe)
|
||||
{
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull BindingRecipeJEI recipe) {
|
||||
return recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(@Nonnull BindingRecipeJEI recipe)
|
||||
{
|
||||
public boolean isRecipeValid(@Nonnull BindingRecipeJEI recipe) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
package WayofTime.bloodmagic.compat.jei.binding;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BindingRecipeJEI extends BlankRecipeWrapper
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
public class BindingRecipeJEI extends BlankRecipeWrapper {
|
||||
@Nonnull
|
||||
private final List<ItemStack> inputs;
|
||||
|
||||
|
@ -21,8 +19,7 @@ public class BindingRecipeJEI extends BlankRecipeWrapper
|
|||
private final ItemStack output;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public BindingRecipeJEI(@Nonnull List<ItemStack> input, @Nonnull ItemStack catalyst, @Nonnull ItemStack output)
|
||||
{
|
||||
public BindingRecipeJEI(@Nonnull List<ItemStack> input, @Nonnull ItemStack catalyst, @Nonnull ItemStack output) {
|
||||
this.inputs = input;
|
||||
this.catalyst = catalyst;
|
||||
this.output = output;
|
||||
|
|
|
@ -1,38 +1,31 @@
|
|||
package WayofTime.bloodmagic.compat.jei.binding;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectBinding;
|
||||
import WayofTime.bloodmagic.api.ItemStackWrapper;
|
||||
import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect;
|
||||
import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry;
|
||||
|
||||
import com.google.common.collect.BiMap;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BindingRecipeMaker
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class BindingRecipeMaker {
|
||||
@Nonnull
|
||||
public static List<BindingRecipeJEI> getRecipes()
|
||||
{
|
||||
public static List<BindingRecipeJEI> getRecipes() {
|
||||
Map<List<ItemStack>, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> alchemyArrayRecipeMap = AlchemyArrayRecipeRegistry.getRecipes();
|
||||
|
||||
ArrayList<BindingRecipeJEI> recipes = new ArrayList<BindingRecipeJEI>();
|
||||
|
||||
for (Map.Entry<List<ItemStack>, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> itemStackAlchemyArrayRecipeEntry : alchemyArrayRecipeMap.entrySet())
|
||||
{
|
||||
for (Map.Entry<List<ItemStack>, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> itemStackAlchemyArrayRecipeEntry : alchemyArrayRecipeMap.entrySet()) {
|
||||
List<ItemStack> input = itemStackAlchemyArrayRecipeEntry.getValue().getInput();
|
||||
BiMap<ItemStackWrapper, AlchemyArrayEffect> catalystMap = itemStackAlchemyArrayRecipeEntry.getValue().catalystMap;
|
||||
|
||||
for (Map.Entry<ItemStackWrapper, AlchemyArrayEffect> entry : catalystMap.entrySet())
|
||||
{
|
||||
for (Map.Entry<ItemStackWrapper, AlchemyArrayEffect> entry : catalystMap.entrySet()) {
|
||||
ItemStack catalyst = entry.getKey().toStack();
|
||||
if (AlchemyArrayRecipeRegistry.getAlchemyArrayEffect(input, catalyst) instanceof AlchemyArrayEffectBinding)
|
||||
{
|
||||
if (AlchemyArrayRecipeRegistry.getAlchemyArrayEffect(input, catalyst) instanceof AlchemyArrayEffectBinding) {
|
||||
ItemStack output = ((AlchemyArrayEffectBinding) itemStackAlchemyArrayRecipeEntry.getValue().getAlchemyArrayEffectForCatalyst(catalyst)).outputStack;
|
||||
|
||||
BindingRecipeJEI recipe = new BindingRecipeJEI(input, catalyst, output);
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package WayofTime.bloodmagic.compat.jei.forge;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mezz.jei.api.gui.ICraftingGridHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
|
@ -16,12 +14,12 @@ import mezz.jei.api.recipe.IRecipeWrapper;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class TartaricForgeRecipeCategory implements IRecipeCategory
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class TartaricForgeRecipeCategory implements IRecipeCategory {
|
||||
private static final int OUTPUT_SLOT = 0;
|
||||
private static final int GEM_SLOT = 1;
|
||||
private static final int INPUT_SLOT = 2;
|
||||
|
@ -33,57 +31,48 @@ public class TartaricForgeRecipeCategory implements IRecipeCategory
|
|||
@Nonnull
|
||||
private final ICraftingGridHelper craftingGridHelper;
|
||||
|
||||
public TartaricForgeRecipeCategory()
|
||||
{
|
||||
public TartaricForgeRecipeCategory() {
|
||||
craftingGridHelper = BloodMagicPlugin.jeiHelper.getGuiHelper().createCraftingGridHelper(INPUT_SLOT, OUTPUT_SLOT);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUid()
|
||||
{
|
||||
public String getUid() {
|
||||
return Constants.Compat.JEI_CATEGORY_SOULFORGE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getTitle()
|
||||
{
|
||||
public String getTitle() {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground()
|
||||
{
|
||||
public IDrawable getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft)
|
||||
{
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public IDrawable getIcon()
|
||||
{
|
||||
public IDrawable getIcon() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients)
|
||||
{
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) {
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
guiItemStacks.init(OUTPUT_SLOT, false, 73, 13);
|
||||
guiItemStacks.init(GEM_SLOT, true, 42, 0);
|
||||
|
||||
for (int y = 0; y < 3; ++y)
|
||||
{
|
||||
for (int x = 0; x < 3; ++x)
|
||||
{
|
||||
for (int y = 0; y < 3; ++y) {
|
||||
for (int x = 0; x < 3; ++x) {
|
||||
int index = INPUT_SLOT + x + (y * 3);
|
||||
guiItemStacks.init(index, true, x * 18, y * 18);
|
||||
}
|
||||
|
@ -92,8 +81,7 @@ public class TartaricForgeRecipeCategory implements IRecipeCategory
|
|||
List<List<ItemStack>> inputs = ingredients.getInputs(ItemStack.class);
|
||||
List<List<ItemStack>> outputs = ingredients.getOutputs(ItemStack.class);
|
||||
|
||||
if (recipeWrapper instanceof TartaricForgeRecipeJEI)
|
||||
{
|
||||
if (recipeWrapper instanceof TartaricForgeRecipeJEI) {
|
||||
TartaricForgeRecipeJEI recipe = (TartaricForgeRecipeJEI) recipeWrapper;
|
||||
guiItemStacks.set(GEM_SLOT, ingredients.getInputs(ItemStack.class).get(ingredients.getInputs(ItemStack.class).size() - 1));
|
||||
inputs.remove(ingredients.getInputs(ItemStack.class).size() - 1);
|
||||
|
|
|
@ -6,31 +6,26 @@ import mezz.jei.api.recipe.IRecipeWrapper;
|
|||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class TartaricForgeRecipeHandler implements IRecipeHandler<TartaricForgeRecipeJEI>
|
||||
{
|
||||
public class TartaricForgeRecipeHandler implements IRecipeHandler<TartaricForgeRecipeJEI> {
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<TartaricForgeRecipeJEI> getRecipeClass()
|
||||
{
|
||||
public Class<TartaricForgeRecipeJEI> getRecipeClass() {
|
||||
return TartaricForgeRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull TartaricForgeRecipeJEI recipe)
|
||||
{
|
||||
public String getRecipeCategoryUid(@Nonnull TartaricForgeRecipeJEI recipe) {
|
||||
return Constants.Compat.JEI_CATEGORY_SOULFORGE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull TartaricForgeRecipeJEI recipe)
|
||||
{
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull TartaricForgeRecipeJEI recipe) {
|
||||
return recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(@Nonnull TartaricForgeRecipeJEI recipe)
|
||||
{
|
||||
public boolean isRecipeValid(@Nonnull TartaricForgeRecipeJEI recipe) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,25 +1,22 @@
|
|||
package WayofTime.bloodmagic.compat.jei.forge;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class TartaricForgeRecipeJEI extends BlankRecipeWrapper
|
||||
{
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TartaricForgeRecipeJEI extends BlankRecipeWrapper {
|
||||
private TartaricForgeRecipe recipe;
|
||||
private List<ItemStack> validGems = new ArrayList<ItemStack>();
|
||||
|
||||
public TartaricForgeRecipeJEI(TartaricForgeRecipe recipe)
|
||||
{
|
||||
public TartaricForgeRecipeJEI(TartaricForgeRecipe recipe) {
|
||||
this.recipe = recipe;
|
||||
|
||||
for (DefaultWill will : DefaultWill.values())
|
||||
|
@ -37,11 +34,9 @@ public class TartaricForgeRecipeJEI extends BlankRecipeWrapper
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<String> getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
public List<String> getTooltipStrings(int mouseX, int mouseY) {
|
||||
ArrayList<String> ret = new ArrayList<String>();
|
||||
if (mouseX >= 40 && mouseX <= 60 && mouseY >= 21 && mouseY <= 34)
|
||||
{
|
||||
if (mouseX >= 40 && mouseX <= 60 && mouseY >= 21 && mouseY <= 34) {
|
||||
ret.add(TextHelper.localize("jei.bloodmagic.recipe.minimumSouls", recipe.getMinimumSouls()));
|
||||
ret.add(TextHelper.localize("jei.bloodmagic.recipe.soulsDrained", recipe.getSoulsDrained()));
|
||||
return ret;
|
||||
|
@ -49,8 +44,15 @@ public class TartaricForgeRecipeJEI extends BlankRecipeWrapper
|
|||
return null;
|
||||
}
|
||||
|
||||
public enum DefaultWill
|
||||
{
|
||||
public TartaricForgeRecipe getRecipe() {
|
||||
return recipe;
|
||||
}
|
||||
|
||||
public List<ItemStack> getValidGems() {
|
||||
return validGems;
|
||||
}
|
||||
|
||||
public enum DefaultWill {
|
||||
SOUL(new ItemStack(RegistrarBloodMagicItems.MONSTER_SOUL, 1, 0), 64),
|
||||
PETTY(new ItemStack(RegistrarBloodMagicItems.SOUL_GEM, 1, 0), 64),
|
||||
LESSER(new ItemStack(RegistrarBloodMagicItems.SOUL_GEM, 1, 1), 256),
|
||||
|
@ -61,18 +63,9 @@ public class TartaricForgeRecipeJEI extends BlankRecipeWrapper
|
|||
public final ItemStack willStack;
|
||||
public final double minSouls;
|
||||
|
||||
DefaultWill(ItemStack willStack, double minSouls)
|
||||
{
|
||||
DefaultWill(ItemStack willStack, double minSouls) {
|
||||
this.willStack = willStack;
|
||||
this.minSouls = minSouls;
|
||||
}
|
||||
}
|
||||
|
||||
public TartaricForgeRecipe getRecipe() {
|
||||
return recipe;
|
||||
}
|
||||
|
||||
public List<ItemStack> getValidGems() {
|
||||
return validGems;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
package WayofTime.bloodmagic.compat.jei.forge;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe;
|
||||
import WayofTime.bloodmagic.api.registry.TartaricForgeRecipeRegistry;
|
||||
|
||||
public class TartaricForgeRecipeMaker
|
||||
{
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TartaricForgeRecipeMaker {
|
||||
@Nonnull
|
||||
public static List<TartaricForgeRecipeJEI> getRecipes()
|
||||
{
|
||||
public static List<TartaricForgeRecipeJEI> getRecipes() {
|
||||
List<TartaricForgeRecipe> recipeList = TartaricForgeRecipeRegistry.getRecipeList();
|
||||
ArrayList<TartaricForgeRecipeJEI> recipes = new ArrayList<TartaricForgeRecipeJEI>();
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.bloodmagic.compat.waila;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.*;
|
||||
import WayofTime.bloodmagic.compat.waila.provider.*;
|
||||
import mcp.mobius.waila.api.IWailaPlugin;
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import mcp.mobius.waila.api.WailaPlugin;
|
||||
|
||||
@WailaPlugin
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.bloodmagic.compat.waila.provider;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicBlocks;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||
import WayofTime.bloodmagic.tile.TileAlchemyArray;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
@ -11,37 +14,28 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicBlocks;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||
import WayofTime.bloodmagic.tile.TileAlchemyArray;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class DataProviderAlchemyArray implements IWailaDataProvider
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class DataProviderAlchemyArray implements IWailaDataProvider {
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return new ItemStack(RegistrarBloodMagicItems.ARCANE_ASHES).setStackDisplayName(TextHelper.getFormattedText(RegistrarBloodMagicBlocks.ALCHEMY_ARRAY.getLocalizedName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig(Constants.Compat.WAILA_CONFIG_ARRAY))
|
||||
return currenttip;
|
||||
|
||||
if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK))
|
||||
{
|
||||
if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK)) {
|
||||
TileEntity tile = accessor.getTileEntity();
|
||||
if (tile instanceof TileAlchemyArray)
|
||||
{
|
||||
if (tile instanceof TileAlchemyArray) {
|
||||
TileAlchemyArray tileArray = (TileAlchemyArray) tile;
|
||||
if (!tileArray.getStackInSlot(0).isEmpty())
|
||||
currenttip.add(TextHelper.localize("waila.bloodmagic.array.reagent", tileArray.getStackInSlot(0).getDisplayName()));
|
||||
|
@ -49,8 +43,7 @@ public class DataProviderAlchemyArray implements IWailaDataProvider
|
|||
if (!tileArray.getStackInSlot(1).isEmpty())
|
||||
currenttip.add(TextHelper.localize("waila.bloodmagic.array.catalyst", tileArray.getStackInSlot(1).getDisplayName()));
|
||||
}
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
currenttip.add(TextHelper.localizeEffect("waila.bloodmagic.sneak"));
|
||||
}
|
||||
|
||||
|
@ -58,14 +51,12 @@ public class DataProviderAlchemyArray implements IWailaDataProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos)
|
||||
{
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
package WayofTime.bloodmagic.compat.waila.provider;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.BlockAltar;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||
import WayofTime.bloodmagic.item.sigil.ItemSigilDivination;
|
||||
import WayofTime.bloodmagic.item.sigil.ItemSigilSeer;
|
||||
import WayofTime.bloodmagic.tile.TileAltar;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
@ -12,94 +18,75 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.BlockAltar;
|
||||
import WayofTime.bloodmagic.item.sigil.ItemSigilDivination;
|
||||
import WayofTime.bloodmagic.item.sigil.ItemSigilSeer;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||
import WayofTime.bloodmagic.tile.TileAltar;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Integrated from WailaPlugins by <a
|
||||
* href="https://github.com/tterrag1098">tterrag1098</a>. Originally implemented
|
||||
* in ImLookingAtBlood by <a href="https://github.com/Pokefenn">Pokefenn</a>.
|
||||
*/
|
||||
public class DataProviderBloodAltar implements IWailaDataProvider
|
||||
{
|
||||
public class DataProviderBloodAltar implements IWailaDataProvider {
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig(Constants.Compat.WAILA_CONFIG_ALTAR))
|
||||
return currenttip;
|
||||
|
||||
boolean hasSigil = false;
|
||||
boolean hasSeer = false;
|
||||
|
||||
switch (ConfigHandler.wailaAltarDisplayMode)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
hasSigil = hasSeer = true;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
hasSeer = holdingSeerSigil(accessor.getPlayer());
|
||||
hasSigil = hasSeer || holdingDivinationSigil(accessor.getPlayer());
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
hasSeer = hasStack(new ItemStack(RegistrarBloodMagicItems.SIGIL_SEER), accessor.getPlayer());
|
||||
hasSigil = hasSeer || hasStack(new ItemStack(RegistrarBloodMagicItems.SIGIL_DIVINATION), accessor.getPlayer());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
switch (ConfigHandler.wailaAltarDisplayMode) {
|
||||
case 0: {
|
||||
hasSigil = hasSeer = true;
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
hasSeer = holdingSeerSigil(accessor.getPlayer());
|
||||
hasSigil = hasSeer || holdingDivinationSigil(accessor.getPlayer());
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
hasSeer = hasStack(new ItemStack(RegistrarBloodMagicItems.SIGIL_SEER), accessor.getPlayer());
|
||||
hasSigil = hasSeer || hasStack(new ItemStack(RegistrarBloodMagicItems.SIGIL_DIVINATION), accessor.getPlayer());
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasSeer && !hasSigil)
|
||||
return currenttip;
|
||||
|
||||
if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK))
|
||||
{
|
||||
if (accessor.getBlock() instanceof BlockAltar && accessor.getTileEntity() instanceof TileAltar)
|
||||
{
|
||||
if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK)) {
|
||||
if (accessor.getBlock() instanceof BlockAltar && accessor.getTileEntity() instanceof TileAltar) {
|
||||
TileAltar altar = (TileAltar) accessor.getTileEntity();
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentAltarTier", altar.getTier().toInt()));
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentAltarCapacity", altar.getCapacity()));
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentEssence", altar.getCurrentBlood()));
|
||||
|
||||
if (hasSeer)
|
||||
{
|
||||
if (hasSeer) {
|
||||
int charge = accessor.getNBTData().getCompoundTag("bloodAltar").getInteger(Constants.NBT.ALTAR_TOTAL_CHARGE);
|
||||
int progress = accessor.getNBTData().getCompoundTag("bloodAltar").getInteger(Constants.NBT.ALTAR_PROGRESS);
|
||||
int liquidRequired = accessor.getNBTData().getCompoundTag("bloodAltar").getInteger(Constants.NBT.ALTAR_LIQUID_REQ);
|
||||
int craftAmount = 1;
|
||||
if (accessor.getNBTData().getTagList("Items", 10).get(0).getId() == 10)
|
||||
craftAmount = ((NBTTagCompound)accessor.getNBTData().getTagList("Items", 10).get(0)).getByte("Count");
|
||||
craftAmount = ((NBTTagCompound) accessor.getNBTData().getTagList("Items", 10).get(0)).getByte("Count");
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentAltarProgress.percent", (int) (((double) progress / (double) liquidRequired * 100) / craftAmount) + "%"));
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentCharge", charge));
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
currenttip.add(TextHelper.localizeEffect("waila.bloodmagic.sneak"));
|
||||
}
|
||||
|
||||
|
@ -107,21 +94,18 @@ public class DataProviderBloodAltar implements IWailaDataProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos)
|
||||
{
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) {
|
||||
if (te != null)
|
||||
te.writeToNBT(tag);
|
||||
return tag;
|
||||
}
|
||||
|
||||
public static boolean hasStack(ItemStack stack, EntityPlayer player)
|
||||
{
|
||||
public static boolean hasStack(ItemStack stack, EntityPlayer player) {
|
||||
for (ItemStack inventoryStack : player.inventory.mainInventory)
|
||||
if (inventoryStack != null && inventoryStack.isItemEqual(stack))
|
||||
return true;
|
||||
|
@ -129,8 +113,7 @@ public class DataProviderBloodAltar implements IWailaDataProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static boolean holdingSeerSigil(EntityPlayer player)
|
||||
{
|
||||
private static boolean holdingSeerSigil(EntityPlayer player) {
|
||||
if (player.getHeldItemMainhand().getItem() instanceof ItemSigilSeer)
|
||||
return true;
|
||||
|
||||
|
@ -140,8 +123,7 @@ public class DataProviderBloodAltar implements IWailaDataProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static boolean holdingDivinationSigil(EntityPlayer player)
|
||||
{
|
||||
private static boolean holdingDivinationSigil(EntityPlayer player) {
|
||||
if (player.getHeldItemMainhand().getItem() instanceof ItemSigilDivination)
|
||||
return true;
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import WayofTime.bloodmagic.api.Constants;
|
|||
import WayofTime.bloodmagic.block.BlockBloodTank;
|
||||
import WayofTime.bloodmagic.tile.TileBloodTank;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import com.google.common.base.Strings;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
@ -18,30 +17,24 @@ import net.minecraftforge.fluids.FluidStack;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class DataProviderBloodTank implements IWailaDataProvider
|
||||
{
|
||||
public class DataProviderBloodTank implements IWailaDataProvider {
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig(Constants.Compat.WAILA_CONFIG_BLOOD_TANK) && !config.getConfig("capability.tankinfo"))
|
||||
return currenttip;
|
||||
|
||||
if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK))
|
||||
{
|
||||
if (accessor.getBlock() instanceof BlockBloodTank && accessor.getTileEntity() instanceof TileBloodTank)
|
||||
{
|
||||
if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK)) {
|
||||
if (accessor.getBlock() instanceof BlockBloodTank && accessor.getTileEntity() instanceof TileBloodTank) {
|
||||
TileBloodTank bloodTank = (TileBloodTank) accessor.getTileEntity();
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
int capacity = accessor.getNBTData().getInteger(Constants.NBT.ALTAR_CAPACITY);
|
||||
|
@ -49,15 +42,12 @@ public class DataProviderBloodTank implements IWailaDataProvider
|
|||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.fluid.capacity", capacity));
|
||||
|
||||
FluidStack fluidStack = FluidStack.loadFluidStackFromNBT(tag.getCompoundTag(Constants.NBT.TANK));
|
||||
if (fluidStack != null)
|
||||
{
|
||||
if (fluidStack != null) {
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.fluid.type", fluidStack.getLocalizedName()));
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.fluid.amount", fluidStack.amount, capacity));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
currenttip.add(TextHelper.localizeEffect("waila.bloodmagic.sneak"));
|
||||
}
|
||||
|
||||
|
@ -65,14 +55,12 @@ public class DataProviderBloodTank implements IWailaDataProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos)
|
||||
{
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) {
|
||||
if (te != null)
|
||||
te.writeToNBT(tag);
|
||||
return tag;
|
||||
|
|
|
@ -13,12 +13,10 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class DataProviderMimic implements IWailaDataProvider
|
||||
{
|
||||
public class DataProviderMimic implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (accessor.getNBTData().getBoolean("hasItem"))
|
||||
return new ItemStack(accessor.getNBTData());
|
||||
|
||||
|
@ -26,28 +24,23 @@ public class DataProviderMimic implements IWailaDataProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos)
|
||||
{
|
||||
if (te instanceof TileMimic && ((TileMimic) te).getStackInSlot(0) != null)
|
||||
{
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) {
|
||||
if (te instanceof TileMimic && ((TileMimic) te).getStackInSlot(0) != null) {
|
||||
tag.setBoolean("hasItem", true);
|
||||
((TileMimic) te).getStackInSlot(0).writeToNBT(tag);
|
||||
}
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
package WayofTime.bloodmagic.compat.waila.provider;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.api.BlockStack;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.registry.ImperfectRitualRegistry;
|
||||
|
@ -22,60 +10,60 @@ import WayofTime.bloodmagic.block.BlockRitualController;
|
|||
import WayofTime.bloodmagic.tile.TileImperfectRitualStone;
|
||||
import WayofTime.bloodmagic.tile.TileMasterRitualStone;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DataProviderRitualController implements IWailaDataProvider
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class DataProviderRitualController implements IWailaDataProvider {
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig(Constants.Compat.WAILA_CONFIG_RITUAL))
|
||||
return currenttip;
|
||||
|
||||
if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK))
|
||||
{
|
||||
if (accessor.getBlock() instanceof BlockRitualController)
|
||||
{
|
||||
if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK)) {
|
||||
if (accessor.getBlock() instanceof BlockRitualController) {
|
||||
int controllerMeta = accessor.getBlock().getMetaFromState(accessor.getBlockState());
|
||||
|
||||
if ((controllerMeta == 0 || controllerMeta == 2) && accessor.getTileEntity() instanceof TileMasterRitualStone)
|
||||
{
|
||||
if ((controllerMeta == 0 || controllerMeta == 2) && accessor.getTileEntity() instanceof TileMasterRitualStone) {
|
||||
TileMasterRitualStone mrs = (TileMasterRitualStone) accessor.getTileEntity();
|
||||
|
||||
if (mrs.getCurrentRitual() != null && mrs.isActive())
|
||||
{
|
||||
if (mrs.getCurrentRitual() != null && mrs.isActive()) {
|
||||
currenttip.add(TextHelper.localizeEffect(mrs.getCurrentRitual().getUnlocalizedName()));
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.currentOwner", PlayerHelper.getUsernameFromUUID(mrs.getOwner())));
|
||||
if (!RitualRegistry.ritualEnabled(mrs.getCurrentRitual()))
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.config.disabled"));
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.deactivated"));
|
||||
}
|
||||
}
|
||||
|
||||
if (controllerMeta == 1 && accessor.getTileEntity() instanceof TileImperfectRitualStone)
|
||||
{
|
||||
if (accessor.getWorld().isAirBlock(accessor.getPosition().up()))
|
||||
{
|
||||
if (controllerMeta == 1 && accessor.getTileEntity() instanceof TileImperfectRitualStone) {
|
||||
if (accessor.getWorld().isAirBlock(accessor.getPosition().up())) {
|
||||
Block up = accessor.getWorld().getBlockState(accessor.getPosition().up()).getBlock();
|
||||
int meta = up.getMetaFromState(accessor.getWorld().getBlockState(accessor.getPosition().up()));
|
||||
BlockStack blockStack = new BlockStack(up, meta);
|
||||
ImperfectRitual ritual = ImperfectRitualRegistry.getRitualForBlock(blockStack);
|
||||
|
||||
if (ritual != null)
|
||||
{
|
||||
if (ritual != null) {
|
||||
currenttip.add(TextHelper.localizeEffect(ritual.getUnlocalizedName()));
|
||||
if (!ImperfectRitualRegistry.ritualEnabled(ritual))
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.config.disabled"));
|
||||
|
@ -83,8 +71,7 @@ public class DataProviderRitualController implements IWailaDataProvider
|
|||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
currenttip.add(TextHelper.localizeEffect("waila.bloodmagic.sneak"));
|
||||
}
|
||||
|
||||
|
@ -92,14 +79,12 @@ public class DataProviderRitualController implements IWailaDataProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos)
|
||||
{
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.bloodmagic.compat.waila.provider;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.BlockTeleposer;
|
||||
import WayofTime.bloodmagic.item.ItemTelepositionFocus;
|
||||
import WayofTime.bloodmagic.tile.TileTeleposer;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
@ -11,39 +14,29 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.BlockTeleposer;
|
||||
import WayofTime.bloodmagic.item.ItemTelepositionFocus;
|
||||
import WayofTime.bloodmagic.tile.TileTeleposer;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class DataProviderTeleposer implements IWailaDataProvider
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class DataProviderTeleposer implements IWailaDataProvider {
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig(Constants.Compat.WAILA_CONFIG_TELEPOSER))
|
||||
return currenttip;
|
||||
|
||||
if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK))
|
||||
{
|
||||
if (accessor.getBlock() instanceof BlockTeleposer && accessor.getTileEntity() instanceof TileTeleposer)
|
||||
{
|
||||
if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK)) {
|
||||
if (accessor.getBlock() instanceof BlockTeleposer && accessor.getTileEntity() instanceof TileTeleposer) {
|
||||
TileTeleposer teleposer = (TileTeleposer) accessor.getTileEntity();
|
||||
if (!teleposer.getStackInSlot(0).isEmpty())
|
||||
{
|
||||
if (!teleposer.getStackInSlot(0).isEmpty()) {
|
||||
ItemStack contained = teleposer.getStackInSlot(0);
|
||||
BlockPos toPos = ((ItemTelepositionFocus) contained.getItem()).getBlockPos(contained);
|
||||
int dimensionID = contained.getTagCompound().getInteger(Constants.NBT.DIMENSION_ID);
|
||||
|
@ -52,8 +45,7 @@ public class DataProviderTeleposer implements IWailaDataProvider
|
|||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.telepositionFocus.dimension", dimensionID));
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
currenttip.add(TextHelper.localizeEffect("waila.bloodmagic.sneak"));
|
||||
}
|
||||
|
||||
|
@ -61,14 +53,12 @@ public class DataProviderTeleposer implements IWailaDataProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos)
|
||||
{
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue