Initial stab at 1.11
About halfway.
This commit is contained in:
parent
ce52aea512
commit
00d6f8eb46
157 changed files with 1036 additions and 1554 deletions
|
@ -1,25 +0,0 @@
|
|||
package WayofTime.bloodmagic.compat.buttons;
|
||||
|
||||
import WayofTime.bloodmagic.compat.buttons.button.ButtonFillNetwork;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import tehnut.buttons.api.ButtonsPlugin;
|
||||
import tehnut.buttons.api.IWidgetPlugin;
|
||||
import tehnut.buttons.api.IWidgetRegistry;
|
||||
import tehnut.buttons.api.WidgetTexture;
|
||||
|
||||
@ButtonsPlugin
|
||||
public class BloodMagicPlugin extends IWidgetPlugin.Base {
|
||||
|
||||
public static final WidgetTexture FILL_BUTTON = new WidgetTexture(
|
||||
new ResourceLocation("bloodmagic", "textures/gui/buttons_compat.png"),
|
||||
0,
|
||||
0,
|
||||
20,
|
||||
20
|
||||
);
|
||||
|
||||
@Override
|
||||
public void register(IWidgetRegistry widgetRegistry) {
|
||||
widgetRegistry.addUtilityButton(new ButtonFillNetwork());
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
package WayofTime.bloodmagic.compat.buttons.button;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.saving.SoulNetwork;
|
||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
import WayofTime.bloodmagic.compat.buttons.BloodMagicPlugin;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import tehnut.buttons.api.button.utility.Button;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class ButtonFillNetwork extends Button {
|
||||
|
||||
public ButtonFillNetwork() {
|
||||
super(BloodMagicPlugin.FILL_BUTTON);
|
||||
|
||||
setServerRequired();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<? extends ITextComponent> getTooltip() {
|
||||
return Collections.singletonList(new TextComponentTranslation("button.bloodmagic.tooltip.fill"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServerClick(EntityPlayerMP player) {
|
||||
SoulNetwork network = NetworkHelper.getSoulNetwork(player);
|
||||
network.setCurrentEssence(Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getButtonId() {
|
||||
return new ResourceLocation(Constants.Mod.MODID, "button_fillnetwork");
|
||||
}
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
package WayofTime.bloodmagic.compat.guideapi;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import WayofTime.bloodmagic.compat.ICompatibility;
|
||||
import amerifrance.guideapi.api.GuideAPI;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
public class CompatibilityGuideAPI implements ICompatibility
|
||||
{
|
||||
private static IRecipe guideRecipe = null;
|
||||
private static boolean worldFlag;
|
||||
|
||||
@Override
|
||||
public void loadCompatibility(InitializationPhase phase)
|
||||
{
|
||||
switch (phase)
|
||||
{
|
||||
case PRE_INIT:
|
||||
{
|
||||
GuideBloodMagic.initBook();
|
||||
GameRegistry.register(GuideBloodMagic.guideBook);
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
|
||||
GuideAPI.setModel(GuideBloodMagic.guideBook);
|
||||
|
||||
break;
|
||||
}
|
||||
case INIT:
|
||||
{
|
||||
guideRecipe = new ShapelessOreRecipe(GuideAPI.getStackFromBook(GuideBloodMagic.guideBook), new ItemStack(Items.BOOK), Blocks.GLASS, Items.FEATHER);
|
||||
break;
|
||||
}
|
||||
case POST_INIT:
|
||||
{
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
|
||||
GuideBloodMagic.initCategories();
|
||||
break;
|
||||
}
|
||||
case MAPPING:
|
||||
{
|
||||
if (!worldFlag) {
|
||||
GameRegistry.addRecipe(guideRecipe);
|
||||
worldFlag = true;
|
||||
} else {
|
||||
CraftingManager.getInstance().getRecipeList().remove(guideRecipe);
|
||||
worldFlag = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModId()
|
||||
{
|
||||
return "guideapi";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enableCompat()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,50 +1,56 @@
|
|||
package WayofTime.bloodmagic.compat.guideapi;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.guideapi.book.*;
|
||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import amerifrance.guideapi.api.GuideAPI;
|
||||
import amerifrance.guideapi.api.GuideBook;
|
||||
import amerifrance.guideapi.api.IGuideBook;
|
||||
import amerifrance.guideapi.api.impl.Book;
|
||||
import amerifrance.guideapi.api.util.NBTBookTags;
|
||||
import amerifrance.guideapi.category.CategoryItemStack;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.awt.Color;
|
||||
|
||||
public class GuideBloodMagic
|
||||
@GuideBook
|
||||
public class GuideBloodMagic implements IGuideBook
|
||||
{
|
||||
public static Book guideBook;
|
||||
|
||||
public static void initBook()
|
||||
{
|
||||
@Nullable
|
||||
@Override
|
||||
public Book buildBook() {
|
||||
guideBook = new Book();
|
||||
guideBook.setTitle("guide.BloodMagic.title");
|
||||
guideBook.setDisplayName("guide.BloodMagic.display");
|
||||
guideBook.setWelcomeMessage("guide.BloodMagic.welcome");
|
||||
guideBook.setAuthor("guide.BloodMagic.author");
|
||||
guideBook.setRegistryName("BloodMagic");
|
||||
guideBook.setRegistryName(new ResourceLocation(Constants.Mod.MODID, "guide"));
|
||||
guideBook.setColor(Color.RED);
|
||||
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
|
||||
GuideAPI.setModel(guideBook);
|
||||
return guideBook;
|
||||
}
|
||||
|
||||
public static void initCategories()
|
||||
{
|
||||
@Override
|
||||
public void handleModel(ItemStack bookStack) {
|
||||
GuideAPI.setModel(guideBook);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlePost(ItemStack bookStack) {
|
||||
guideBook.addCategory(new CategoryItemStack(CategoryAlchemy.buildCategory(), "guide.BloodMagic.category.alchemy", new ItemStack(ModItems.ARCANE_ASHES)));
|
||||
guideBook.addCategory(new CategoryItemStack(CategoryArchitect.buildCategory(), "guide.BloodMagic.category.architect", new ItemStack(ModItems.SIGIL_DIVINATION)));
|
||||
guideBook.addCategory(new CategoryItemStack(CategoryDemon.buildCategory(), "guide.BloodMagic.category.demon", new ItemStack(ModItems.BLOOD_SHARD)));
|
||||
guideBook.addCategory(new CategoryItemStack(CategoryRitual.buildCategory(), "guide.BloodMagic.category.ritual", new ItemStack(ModBlocks.RITUAL_CONTROLLER)));
|
||||
// guideBook.addCategory(new CategoryItemStack(CategorySpell.buildCategory(), "guide.BloodMagic.category.spell", new ItemStack(ModItems.ritualDiviner)));
|
||||
}
|
||||
|
||||
public static void initJEIBlacklist()
|
||||
{
|
||||
if (Loader.isModLoaded("JEI"))
|
||||
BloodMagicPlugin.jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(GuideAPI.guideBook, NBTBookTags.BOOK_TAG, NBTBookTags.CATEGORY_PAGE_TAG, NBTBookTags.CATEGORY_TAG, NBTBookTags.ENTRY_PAGE_TAG, NBTBookTags.ENTRY_TAG, NBTBookTags.KEY_TAG, NBTBookTags.PAGE_TAG);
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(GuideAPI.getStackFromBook(GuideBloodMagic.guideBook), new ItemStack(Items.BOOK), Blocks.GLASS, Items.FEATHER));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package WayofTime.bloodmagic.compat.guideapi.page;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -32,17 +33,17 @@ public class PageAlchemyArray extends Page
|
|||
|
||||
public PageAlchemyArray(List<ResourceLocation> resources, ItemStack inputStack, ItemStack catalystStack)
|
||||
{
|
||||
this(resources, inputStack, catalystStack, null);
|
||||
this(resources, inputStack, catalystStack, ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
public PageAlchemyArray(ResourceLocation resource, ItemStack inputStack, ItemStack catalystStack, ItemStack outputStack)
|
||||
{
|
||||
this(Arrays.asList(resource), inputStack, catalystStack, outputStack);
|
||||
this(Collections.singletonList(resource), inputStack, catalystStack, outputStack);
|
||||
}
|
||||
|
||||
public PageAlchemyArray(ResourceLocation resource, ItemStack inputStack, ItemStack catalystStack)
|
||||
{
|
||||
this(Arrays.asList(resource), inputStack, catalystStack);
|
||||
this(Collections.singletonList(resource), inputStack, catalystStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,7 +54,7 @@ public class PageAlchemyArray extends Page
|
|||
int y = guiTop + 30;
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/alchemyArrayCrafting.png"));
|
||||
guiBase.drawTexturedModalRect(x, y, 0, 0, 62, 88 + (outputStack == null ? 0 : 26));
|
||||
guiBase.drawTexturedModalRect(x, y, 0, 0, 62, 88 + (outputStack.isEmpty() ? 0 : 26));
|
||||
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.alchemyArray"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
||||
|
||||
|
@ -85,7 +86,7 @@ public class PageAlchemyArray extends Page
|
|||
guiBase.renderToolTip(catalystStack, mouseX, mouseY);
|
||||
}
|
||||
|
||||
if (outputStack != null)
|
||||
if (!outputStack.isEmpty())
|
||||
{
|
||||
int outputX = x + 43;
|
||||
int outputY = y + 95;
|
||||
|
|
|
@ -53,7 +53,7 @@ public class PageAltarRecipe extends Page
|
|||
guiBase.renderToolTip(input.get(0), mouseX, mouseY);
|
||||
}
|
||||
|
||||
if (output == null)
|
||||
if (output.isEmpty())
|
||||
{
|
||||
output = new ItemStack(Blocks.BARRIER);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyArray;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
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;
|
||||
|
@ -50,14 +53,15 @@ public class AlchemyArrayCraftingCategory implements IRecipeCategory
|
|||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft)
|
||||
public IDrawable getIcon()
|
||||
{
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
||||
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);
|
||||
|
@ -66,9 +70,9 @@ public class AlchemyArrayCraftingCategory implements IRecipeCategory
|
|||
if (recipeWrapper instanceof AlchemyArrayCraftingRecipeJEI)
|
||||
{
|
||||
AlchemyArrayCraftingRecipeJEI alchemyArrayWrapper = (AlchemyArrayCraftingRecipeJEI) recipeWrapper;
|
||||
recipeLayout.getItemStacks().set(INPUT_SLOT, alchemyArrayWrapper.getInputs());
|
||||
recipeLayout.getItemStacks().set(INPUT_SLOT, ingredients.getInputs(ItemStack.class).get(0));
|
||||
recipeLayout.getItemStacks().set(CATALYST_SLOT, alchemyArrayWrapper.getCatalyst());
|
||||
recipeLayout.getItemStacks().set(OUTPUT_SLOT, alchemyArrayWrapper.getOutputs());
|
||||
recipeLayout.getItemStacks().set(OUTPUT_SLOT, ingredients.getOutputs(ItemStack.class).get(0).get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,14 +15,6 @@ public class AlchemyArrayCraftingRecipeHandler implements IRecipeHandler<Alchemy
|
|||
return AlchemyArrayCraftingRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AlchemyArrayCraftingRecipeJEI recipe)
|
||||
{
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
@ -27,22 +28,14 @@ public class AlchemyArrayCraftingRecipeJEI extends BlankRecipeWrapper
|
|||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<ItemStack> getInputs()
|
||||
{
|
||||
return inputs;
|
||||
}
|
||||
|
||||
public ItemStack getCatalyst()
|
||||
{
|
||||
return catalyst;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<ItemStack> getOutputs()
|
||||
{
|
||||
return Collections.singletonList(output);
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setOutputs(ItemStack.class, Collections.singletonList(output));
|
||||
ingredients.setInputs(ItemStack.class, inputs);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyTable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import mezz.jei.api.gui.ICraftingGridHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -63,15 +62,16 @@ public class AlchemyTableRecipeCategory implements IRecipeCategory
|
|||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft)
|
||||
public IDrawable getIcon()
|
||||
{
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients)
|
||||
{
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
|
@ -90,9 +90,9 @@ public class AlchemyTableRecipeCategory implements IRecipeCategory
|
|||
if (recipeWrapper instanceof AlchemyTableRecipeJEI)
|
||||
{
|
||||
AlchemyTableRecipeJEI recipe = (AlchemyTableRecipeJEI) recipeWrapper;
|
||||
guiItemStacks.set(ORB_SLOT, (ArrayList<ItemStack>) recipe.getInputs().get(1));
|
||||
craftingGridHelper.setOutput(guiItemStacks, recipe.getOutputs());
|
||||
craftingGridHelper.setInput(guiItemStacks, (List) recipe.getInputs().get(0), 3, 2);
|
||||
guiItemStacks.set(ORB_SLOT, ingredients.getInputs(ItemStack.class).get(1));
|
||||
craftingGridHelper.setOutput(guiItemStacks, ingredients.getOutputs(ItemStack.class).get(0));
|
||||
craftingGridHelper.setInputs(guiItemStacks, ingredients.getInputs(ItemStack.class), 3, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,14 +15,6 @@ public class AlchemyTableRecipeHandler implements IRecipeHandler<AlchemyTableRec
|
|||
return AlchemyTableRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_ALCHEMYTABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AlchemyTableRecipeJEI recipe)
|
||||
{
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyTable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import lombok.Getter;
|
||||
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.api.registry.OrbRegistry;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class AlchemyTableRecipeJEI extends BlankRecipeWrapper
|
||||
|
@ -20,32 +15,17 @@ public class AlchemyTableRecipeJEI extends BlankRecipeWrapper
|
|||
@Getter
|
||||
private AlchemyTableRecipe recipe;
|
||||
|
||||
// @Getter
|
||||
// private ArrayList<ItemStack> validGems = new ArrayList<ItemStack>();
|
||||
|
||||
public AlchemyTableRecipeJEI(AlchemyTableRecipe recipe)
|
||||
{
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<Collection> getInputs()
|
||||
{
|
||||
ArrayList<Collection> ret = new ArrayList<Collection>();
|
||||
ret.add(recipe.getInput());
|
||||
ret.add(OrbRegistry.getOrbsDownToTier(recipe.getTierRequired()));
|
||||
return ret;
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
// ingredients.setInputLists(ItemStack.class, Lists.<ItemStack>newArrayList(recipe.getInput(), OrbRegistry.getOrbsDownToTier(recipe.getTierRequired())));
|
||||
ingredients.setOutput(ItemStack.class, recipe.getRecipeOutput(new ArrayList<ItemStack>()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<ItemStack> getOutputs()
|
||||
{
|
||||
return Collections.singletonList(recipe.getRecipeOutput(new ArrayList<ItemStack>()));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<String> getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
|
@ -54,8 +34,7 @@ public class AlchemyTableRecipeJEI extends BlankRecipeWrapper
|
|||
{
|
||||
ret.add(TextHelper.localize("jei.BloodMagic.recipe.lpDrained", recipe.getLpDrained()));
|
||||
ret.add(TextHelper.localize("jei.BloodMagic.recipe.ticksRequired", recipe.getTicksRequired()));
|
||||
return ret;
|
||||
}
|
||||
return null;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
package WayofTime.bloodmagic.compat.jei.altar;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -52,14 +54,14 @@ public class AltarRecipeCategory implements IRecipeCategory
|
|||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft)
|
||||
{
|
||||
|
||||
public IDrawable getIcon() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
||||
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);
|
||||
|
@ -67,9 +69,9 @@ public class AltarRecipeCategory implements IRecipeCategory
|
|||
if (recipeWrapper instanceof AltarRecipeJEI)
|
||||
{
|
||||
AltarRecipeJEI altarRecipeWrapper = (AltarRecipeJEI) recipeWrapper;
|
||||
List<List<ItemStack>> inputs = altarRecipeWrapper.getInputs();
|
||||
List<List<ItemStack>> inputs = ingredients.getInputs(ItemStack.class);
|
||||
recipeLayout.getItemStacks().set(INPUT_SLOT, inputs.get(0));
|
||||
recipeLayout.getItemStacks().set(OUTPUT_SLOT, altarRecipeWrapper.getOutputs());
|
||||
recipeLayout.getItemStacks().set(OUTPUT_SLOT, ingredients.getOutputs(ItemStack.class).get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,14 +15,6 @@ public class AltarRecipeHandler implements IRecipeHandler<AltarRecipeJEI>
|
|||
return AltarRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_ALTAR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AltarRecipeJEI recipe)
|
||||
{
|
||||
|
|
|
@ -2,13 +2,12 @@ package WayofTime.bloodmagic.compat.jei.altar;
|
|||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import WayofTime.bloodmagic.util.helper.NumeralHelper;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -37,18 +36,11 @@ public class AltarRecipeJEI extends BlankRecipeWrapper
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<List<ItemStack>> getInputs()
|
||||
{
|
||||
return Collections.singletonList(input);
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInputs(ItemStack.class, input);
|
||||
ingredients.setOutput(ItemStack.class, output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getOutputs()
|
||||
{
|
||||
return Collections.singletonList(output);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<String> getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
|
@ -57,9 +49,8 @@ public class AltarRecipeJEI extends BlankRecipeWrapper
|
|||
{
|
||||
ret.add(TextHelper.localize("jei.BloodMagic.recipe.consumptionRate", consumptionRate));
|
||||
ret.add(TextHelper.localize("jei.BloodMagic.recipe.drainRate", drainRate));
|
||||
return ret;
|
||||
}
|
||||
return null;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package WayofTime.bloodmagic.compat.jei.armourDowngrade;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import mezz.jei.api.gui.ICraftingGridHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -63,15 +62,15 @@ public class ArmourDowngradeRecipeCategory implements IRecipeCategory
|
|||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft)
|
||||
{
|
||||
|
||||
public IDrawable getIcon() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper, IIngredients ingredients)
|
||||
{
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
|
@ -89,10 +88,9 @@ public class ArmourDowngradeRecipeCategory implements IRecipeCategory
|
|||
|
||||
if (recipeWrapper instanceof ArmourDowngradeRecipeJEI)
|
||||
{
|
||||
ArmourDowngradeRecipeJEI recipe = (ArmourDowngradeRecipeJEI) recipeWrapper;
|
||||
guiItemStacks.set(KEY_SLOT, (ArrayList<ItemStack>) recipe.getInputs().get(1));
|
||||
craftingGridHelper.setOutput(guiItemStacks, recipe.getOutputs());
|
||||
craftingGridHelper.setInput(guiItemStacks, (List) recipe.getInputs().get(0), 3, 2);
|
||||
guiItemStacks.set(KEY_SLOT, ingredients.getInputs(ItemStack.class).get(1));
|
||||
craftingGridHelper.setOutput(guiItemStacks, ingredients.getOutputs(ItemStack.class).get(0));
|
||||
craftingGridHelper.setInputs(guiItemStacks, ingredients.getInputs(ItemStack.class), 3, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,14 +15,6 @@ public class ArmourDowngradeRecipeHandler implements IRecipeHandler<ArmourDowngr
|
|||
return ArmourDowngradeRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_ARMOURDOWNGRADE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(ArmourDowngradeRecipeJEI recipe)
|
||||
|
@ -40,6 +32,6 @@ public class ArmourDowngradeRecipeHandler implements IRecipeHandler<ArmourDowngr
|
|||
@Override
|
||||
public boolean isRecipeValid(@Nonnull ArmourDowngradeRecipeJEI recipe)
|
||||
{
|
||||
return recipe.getInputs().get(0).size() > 0 && recipe.getOutputs().size() > 0;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,65 +1,28 @@
|
|||
package WayofTime.bloodmagic.compat.jei.armourDowngrade;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import lombok.Getter;
|
||||
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.registry.ModItems;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
public class ArmourDowngradeRecipeJEI extends BlankRecipeWrapper
|
||||
{
|
||||
@Getter
|
||||
private LivingArmourDowngradeRecipe recipe;
|
||||
|
||||
// @Getter
|
||||
// private ArrayList<ItemStack> validGems = new ArrayList<ItemStack>();
|
||||
|
||||
public ArmourDowngradeRecipeJEI(LivingArmourDowngradeRecipe recipe)
|
||||
{
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<Collection> getInputs()
|
||||
{
|
||||
ArrayList<Collection> ret = new ArrayList<Collection>();
|
||||
ret.add(recipe.getInput());
|
||||
ret.add(Lists.newArrayList(recipe.getKey()));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<ItemStack> getOutputs()
|
||||
{
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
// TODO - inputs
|
||||
ItemStack upgradeStack = new ItemStack(ModItems.UPGRADE_TOME);
|
||||
LivingUpgrades.setUpgrade(upgradeStack, recipe.getRecipeOutput());
|
||||
return Collections.singletonList(upgradeStack);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<String> getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
// ArrayList<String> ret = new ArrayList<String>();
|
||||
// if (mouseX >= 58 && mouseX <= 78 && mouseY >= 21 && mouseY <= 34)
|
||||
// {
|
||||
// ret.add(TextHelper.localize("jei.BloodMagic.recipe.lpDrained", recipe.getLpDrained()));
|
||||
// ret.add(TextHelper.localize("jei.BloodMagic.recipe.ticksRequired", recipe.getTicksRequired()));
|
||||
// return ret;
|
||||
// }
|
||||
return null;
|
||||
ingredients.setOutput(ItemStack.class, upgradeStack);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
package WayofTime.bloodmagic.compat.minecraft;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeModContainer;
|
||||
import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class CrossVersionProxy110 implements ICrossVersionProxy {
|
||||
|
||||
@Override
|
||||
public TileEntity createTileFromData(World world, NBTTagCompound tagCompound)
|
||||
{
|
||||
Method m = ReflectionHelper.findMethod(TileEntity.class, null, new String[] { "create", "func_190200_a", "a" }, World.class, NBTTagCompound.class);
|
||||
try
|
||||
{
|
||||
return (TileEntity) m.invoke(null, world, tagCompound);
|
||||
} catch (Exception e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disableStairSlabCulling()
|
||||
{
|
||||
Field disableStairSlabCulling = ReflectionHelper.findField(ForgeModContainer.class, "disableStairSlabCulling");
|
||||
try
|
||||
{
|
||||
return (Boolean) disableStairSlabCulling.get(null);
|
||||
} catch (Exception e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package WayofTime.bloodmagic.compat.minecraft;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class CrossVersionProxy19 implements ICrossVersionProxy
|
||||
{
|
||||
|
||||
@Override
|
||||
public TileEntity createTileFromData(World world, NBTTagCompound tagCompound)
|
||||
{
|
||||
Method m = ReflectionHelper.findMethod(TileEntity.class, null, new String[] { "create", "func_189514_c", "c" }, NBTTagCompound.class);
|
||||
try
|
||||
{
|
||||
return (TileEntity) m.invoke(null, tagCompound);
|
||||
} catch (Exception e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disableStairSlabCulling()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package WayofTime.bloodmagic.compat.minecraft;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* Allows for Blood Magic to support multiple MC versions that have only slight changes.
|
||||
*
|
||||
* Implementation copied from <a href="https://github.com/williewillus/Botania">Botania</a>.
|
||||
*/
|
||||
public interface ICrossVersionProxy
|
||||
{
|
||||
TileEntity createTileFromData(World world, NBTTagCompound tagCompound);
|
||||
|
||||
boolean disableStairSlabCulling();
|
||||
}
|
|
@ -4,9 +4,6 @@ import WayofTime.bloodmagic.block.*;
|
|||
import WayofTime.bloodmagic.compat.waila.provider.*;
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.base.BlockEnumPillar;
|
||||
import WayofTime.bloodmagic.block.base.BlockEnumPillarCap;
|
||||
import WayofTime.bloodmagic.block.base.BlockEnumStairs;
|
||||
|
||||
public class WailaCallbackHandler
|
||||
{
|
||||
|
@ -22,9 +19,6 @@ public class WailaCallbackHandler
|
|||
registrar.registerStackProvider(new DataProviderAlchemyArray(), BlockAlchemyArray.class);
|
||||
registrar.registerStackProvider(new DataProviderMimic(), BlockMimic.class);
|
||||
registrar.registerNBTProvider(new DataProviderMimic(), BlockMimic.class);
|
||||
registrar.registerStackProvider(DataProviderPillar.INSTANCE, BlockEnumPillarCap.class);
|
||||
registrar.registerStackProvider(DataProviderPillar.INSTANCE, BlockEnumPillar.class);
|
||||
registrar.registerStackProvider(DataProviderPillar.INSTANCE, BlockEnumStairs.class);
|
||||
|
||||
registrar.addConfig(Constants.Mod.MODID, Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK, false);
|
||||
registrar.addConfig(Constants.Mod.MODID, Constants.Compat.WAILA_CONFIG_ALTAR, true);
|
||||
|
|
|
@ -43,10 +43,10 @@ public class DataProviderAlchemyArray implements IWailaDataProvider
|
|||
if (tile instanceof TileAlchemyArray)
|
||||
{
|
||||
TileAlchemyArray tileArray = (TileAlchemyArray) tile;
|
||||
if (tileArray.getStackInSlot(0) != null)
|
||||
if (!tileArray.getStackInSlot(0).isEmpty())
|
||||
currenttip.add(TextHelper.localize("waila.BloodMagic.array.reagent", tileArray.getStackInSlot(0).getDisplayName()));
|
||||
|
||||
if (tileArray.getStackInSlot(1) != null)
|
||||
if (!tileArray.getStackInSlot(1).isEmpty())
|
||||
currenttip.add(TextHelper.localize("waila.BloodMagic.array.catalyst", tileArray.getStackInSlot(1).getDisplayName()));
|
||||
}
|
||||
} else
|
||||
|
|
|
@ -129,10 +129,10 @@ public class DataProviderBloodAltar implements IWailaDataProvider
|
|||
|
||||
private static boolean holdingSeerSigil(EntityPlayer player)
|
||||
{
|
||||
if (player.getHeldItemMainhand() != null && player.getHeldItemMainhand().getItem() instanceof ItemSigilSeer)
|
||||
if (player.getHeldItemMainhand().getItem() instanceof ItemSigilSeer)
|
||||
return true;
|
||||
|
||||
if (player.getHeldItemOffhand() != null && player.getHeldItemOffhand().getItem() instanceof ItemSigilSeer)
|
||||
if (player.getHeldItemOffhand().getItem() instanceof ItemSigilSeer)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -140,10 +140,10 @@ public class DataProviderBloodAltar implements IWailaDataProvider
|
|||
|
||||
private static boolean holdingDivinationSigil(EntityPlayer player)
|
||||
{
|
||||
if (player.getHeldItemMainhand() != null && player.getHeldItemMainhand().getItem() instanceof ItemSigilDivination)
|
||||
if (player.getHeldItemMainhand().getItem() instanceof ItemSigilDivination)
|
||||
return true;
|
||||
|
||||
if (player.getHeldItemOffhand() != null && player.getHeldItemOffhand().getItem() instanceof ItemSigilDivination)
|
||||
if (player.getHeldItemOffhand().getItem() instanceof ItemSigilDivination)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -35,7 +35,7 @@ public class DataProviderBloodTank implements IWailaDataProvider
|
|||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
if (!config.getConfig(Constants.Compat.WAILA_CONFIG_BLOOD_TANK))
|
||||
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))
|
||||
|
|
|
@ -20,7 +20,7 @@ public class DataProviderMimic implements IWailaDataProvider
|
|||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
if (accessor.getNBTData().getBoolean("hasItem"))
|
||||
return ItemStack.loadItemStackFromNBT(accessor.getNBTData());
|
||||
return new ItemStack(accessor.getNBTData());
|
||||
|
||||
return new ItemStack(accessor.getBlock(), 1, accessor.getMetadata());
|
||||
}
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
package WayofTime.bloodmagic.compat.waila.provider;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
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 java.util.List;
|
||||
|
||||
public class DataProviderPillar implements IWailaDataProvider {
|
||||
|
||||
public static final DataProviderPillar INSTANCE = new DataProviderPillar();
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return new ItemStack(accessor.getBlock(), 1, accessor.getBlock().damageDropped(accessor.getBlockState()));
|
||||
}
|
||||
|
||||
@Override
|
||||
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) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
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) {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -65,7 +65,7 @@ public class DataProviderRitualController implements IWailaDataProvider
|
|||
|
||||
if (accessor.getBlock().getMetaFromState(accessor.getBlockState()) == 1 && accessor.getTileEntity() instanceof TileImperfectRitualStone)
|
||||
{
|
||||
if (accessor.getWorld().getBlockState(accessor.getPosition().up()).getBlock() != null)
|
||||
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()));
|
||||
|
|
|
@ -42,7 +42,7 @@ public class DataProviderTeleposer implements IWailaDataProvider
|
|||
if (accessor.getBlock() instanceof BlockTeleposer && accessor.getTileEntity() instanceof TileTeleposer)
|
||||
{
|
||||
TileTeleposer teleposer = (TileTeleposer) accessor.getTileEntity();
|
||||
if (teleposer.getStackInSlot(0) != null)
|
||||
if (!teleposer.getStackInSlot(0).isEmpty())
|
||||
{
|
||||
ItemStack contained = teleposer.getStackInSlot(0);
|
||||
BlockPos toPos = ((ItemTelepositionFocus) contained.getItem()).getBlockPos(contained);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue