Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.BetterArmourAndTools.blocksitems;
- import cpw.mods.fml.relauncher.Side;
- import cpw.mods.fml.relauncher.SideOnly;
- import net.minecraft.client.renderer.texture.IIconRegister;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraft.world.World;
- import net.minecraftforge.event.entity.player.PlayerEvent;
- public class FlyRing extends Item{
- public FlyRing(int id) {
- super();
- this.setCreativeTab(BetterArmourAndTools.rubyTab);
- this.setMaxStackSize(1);
- if (player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().ItemID == BetterArmourAndTools.FlyRing) {
- System.out.println("CALL");
- player.capabilities.allowFlying = true;
- }
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister reg){
- this.itemIcon = reg.registerIcon("BetterArmourAndTools:FlyRing");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment