Updated to Forge 1826
This commit is contained in:
parent
39df6d5bb0
commit
378c59d2b3
10 changed files with 169 additions and 37 deletions
|
@ -0,0 +1,56 @@
|
|||
package WayofTime.bloodmagic.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.client.IVariantProvider;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class ItemExperienceBook extends Item implements IVariantProvider
|
||||
{
|
||||
public ItemExperienceBook()
|
||||
{
|
||||
setUnlocalizedName(Constants.Mod.MODID + ".experienceTome");
|
||||
setRegistryName(Constants.BloodMagicItem.EXPERIENCE_TOME.getRegName());
|
||||
setMaxStackSize(1);
|
||||
setCreativeTab(BloodMagic.tabBloodMagic);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
|
||||
{
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.experienceTome"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
|
||||
return EnumActionResult.FAIL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Pair<Integer, String>> getVariants()
|
||||
{
|
||||
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
|
||||
ret.add(new ImmutablePair<Integer, String>(0, "type=experiencetome"));
|
||||
return ret;
|
||||
}
|
||||
}
|
|
@ -77,7 +77,7 @@ public class ItemSigilTransposition extends ItemSigilBase
|
|||
int cost = getLpUsed();
|
||||
|
||||
NBTTagCompound tileNBTTag = new NBTTagCompound();
|
||||
String blockName = rightClickedBlock.getBlock().getRegistryName();
|
||||
String blockName = rightClickedBlock.getBlock().getRegistryName().toString();
|
||||
byte metadata = (byte) stack.getMetadata();
|
||||
|
||||
if (world.getTileEntity(blockPos) != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue