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
|
@ -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