Java 类net.minecraft.block.BlockJukebox 实例源码

项目:DecompiledMinecraft    文件:ItemRecord.java   
/**
 * Called when a Block is right-clicked with this Item
 */
public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)
{
    IBlockState iblockstate = worldIn.getBlockState(pos);

    if (iblockstate.getBlock() == Blocks.jukebox && !((Boolean)iblockstate.getValue(BlockJukebox.HAS_RECORD)).booleanValue())
    {
        if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            ((BlockJukebox)Blocks.jukebox).insertRecord(worldIn, pos, iblockstate, stack);
            worldIn.playAuxSFXAtEntity((EntityPlayer)null, 1005, pos, Item.getIdFromItem(this));
            --stack.stackSize;
            playerIn.triggerAchievement(StatList.field_181740_X);
            return true;
        }
    }
    else
    {
        return false;
    }
}
项目:DecompiledMinecraft    文件:ItemRecord.java   
/**
 * Called when a Block is right-clicked with this Item
 */
public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)
{
    IBlockState iblockstate = worldIn.getBlockState(pos);

    if (iblockstate.getBlock() == Blocks.jukebox && !((Boolean)iblockstate.getValue(BlockJukebox.HAS_RECORD)).booleanValue())
    {
        if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            ((BlockJukebox)Blocks.jukebox).insertRecord(worldIn, pos, iblockstate, stack);
            worldIn.playAuxSFXAtEntity((EntityPlayer)null, 1005, pos, Item.getIdFromItem(this));
            --stack.stackSize;
            playerIn.triggerAchievement(StatList.field_181740_X);
            return true;
        }
    }
    else
    {
        return false;
    }
}
项目:BaseClient    文件:ItemRecord.java   
/**
 * Called when a Block is right-clicked with this Item
 */
public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)
{
    IBlockState iblockstate = worldIn.getBlockState(pos);

    if (iblockstate.getBlock() == Blocks.jukebox && !((Boolean)iblockstate.getValue(BlockJukebox.HAS_RECORD)).booleanValue())
    {
        if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            ((BlockJukebox)Blocks.jukebox).insertRecord(worldIn, pos, iblockstate, stack);
            worldIn.playAuxSFXAtEntity((EntityPlayer)null, 1005, pos, Item.getIdFromItem(this));
            --stack.stackSize;
            playerIn.triggerAchievement(StatList.field_181740_X);
            return true;
        }
    }
    else
    {
        return false;
    }
}
项目:BaseClient    文件:ItemRecord.java   
/**
 * Called when a Block is right-clicked with this Item
 */
public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)
{
    IBlockState iblockstate = worldIn.getBlockState(pos);

    if (iblockstate.getBlock() == Blocks.jukebox && !((Boolean)iblockstate.getValue(BlockJukebox.HAS_RECORD)).booleanValue())
    {
        if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            ((BlockJukebox)Blocks.jukebox).insertRecord(worldIn, pos, iblockstate, stack);
            worldIn.playAuxSFXAtEntity((EntityPlayer)null, 1005, pos, Item.getIdFromItem(this));
            --stack.stackSize;
            playerIn.triggerAchievement(StatList.field_181740_X);
            return true;
        }
    }
    else
    {
        return false;
    }
}
项目:Backmemed    文件:ItemRecord.java   
/**
 * Called when a Block is right-clicked with this Item
 */
public EnumActionResult onItemUse(EntityPlayer stack, World playerIn, BlockPos worldIn, EnumHand pos, EnumFacing hand, float facing, float hitX, float hitY)
{
    IBlockState iblockstate = playerIn.getBlockState(worldIn);

    if (iblockstate.getBlock() == Blocks.JUKEBOX && !((Boolean)iblockstate.getValue(BlockJukebox.HAS_RECORD)).booleanValue())
    {
        if (!playerIn.isRemote)
        {
            ItemStack itemstack = stack.getHeldItem(pos);
            ((BlockJukebox)Blocks.JUKEBOX).insertRecord(playerIn, worldIn, iblockstate, itemstack);
            playerIn.playEvent((EntityPlayer)null, 1010, worldIn, Item.getIdFromItem(this));
            itemstack.func_190918_g(1);
            stack.addStat(StatList.RECORD_PLAYED);
        }

        return EnumActionResult.SUCCESS;
    }
    else
    {
        return EnumActionResult.PASS;
    }
}
项目:CustomWorldGen    文件:ItemRecord.java   
/**
 * Called when a Block is right-clicked with this Item
 */
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
    IBlockState iblockstate = worldIn.getBlockState(pos);

    if (iblockstate.getBlock() == Blocks.JUKEBOX && !((Boolean)iblockstate.getValue(BlockJukebox.HAS_RECORD)).booleanValue())
    {
        if (!worldIn.isRemote)
        {
            ((BlockJukebox)Blocks.JUKEBOX).insertRecord(worldIn, pos, iblockstate, stack);
            worldIn.playEvent((EntityPlayer)null, 1010, pos, Item.getIdFromItem(this));
            --stack.stackSize;
            playerIn.addStat(StatList.RECORD_PLAYED);
        }

        return EnumActionResult.SUCCESS;
    }
    else
    {
        return EnumActionResult.PASS;
    }
}
项目:PopularMMOS-EpicProportions-Mod    文件:ItemPatCD1.java   
@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10)
{
//TODO: world.getBlock()
if (world.getBlock(x, y, z) == Blocks.jukebox && world.getBlockMetadata(x, y, z) == 0)
{
if (world.isRemote)
return true;
else
{
//TODO: .insertRecord()
((BlockJukebox)Blocks.jukebox).func_149926_b(world, x, y, z, itemStack);
//TODO: Item.getIdFromItem()
world.playAuxSFXAtEntity((EntityPlayer)null, 1005, x, y, z, Item.getIdFromItem(this));
--itemStack.stackSize;
return true;
}
} 
else
return false;
}
项目:PopularMMOS-EpicProportions-Mod    文件:ItemPatCD3.java   
@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10)
{
//TODO: world.getBlock()
if (world.getBlock(x, y, z) == Blocks.jukebox && world.getBlockMetadata(x, y, z) == 0)
{
if (world.isRemote)
return true;
else
{
//TODO: .insertRecord()
((BlockJukebox)Blocks.jukebox).func_149926_b(world, x, y, z, itemStack);
//TODO: Item.getIdFromItem()
world.playAuxSFXAtEntity((EntityPlayer)null, 1005, x, y, z, Item.getIdFromItem(this));
--itemStack.stackSize;
return true;
}
} 
else
return false;
}
项目:PopularMMOS-EpicProportions-Mod    文件:itemCaptainCookieCookie.java   
@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10)
{
//TODO: world.getBlock()
if (world.getBlock(x, y, z) == Blocks.jukebox && world.getBlockMetadata(x, y, z) == 0)
{
if (world.isRemote)
return true;
else
{
//TODO: .insertRecord()
((BlockJukebox)Blocks.jukebox).func_149926_b(world, x, y, z, itemStack);
//TODO: Item.getIdFromItem()
world.playAuxSFXAtEntity((EntityPlayer)null, 1005, x, y, z, Item.getIdFromItem(this));
--itemStack.stackSize;
return true;
}
} 
else
return false;
}
项目:PopularMMOS-EpicProportions-Mod    文件:ItemPatCD2.java   
@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10)
{
//TODO: world.getBlock()
if (world.getBlock(x, y, z) == Blocks.jukebox && world.getBlockMetadata(x, y, z) == 0)
{
if (world.isRemote)
return true;
else
{
//TODO: .insertRecord()
((BlockJukebox)Blocks.jukebox).func_149926_b(world, x, y, z, itemStack);
//TODO: Item.getIdFromItem()
world.playAuxSFXAtEntity((EntityPlayer)null, 1005, x, y, z, Item.getIdFromItem(this));
--itemStack.stackSize;
return true;
}
} 
else
return false;
}
项目:Resilience-Client-Source    文件:ItemRecord.java   
/**
 * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
 * True if something happen and false if it don't. This is for ITEMS, not BLOCKS
 */
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{
    if (par3World.getBlock(par4, par5, par6) == Blocks.jukebox && par3World.getBlockMetadata(par4, par5, par6) == 0)
    {
        if (par3World.isClient)
        {
            return true;
        }
        else
        {
            ((BlockJukebox)Blocks.jukebox).func_149926_b(par3World, par4, par5, par6, par1ItemStack);
            par3World.playAuxSFXAtEntity((EntityPlayer)null, 1005, par4, par5, par6, Item.getIdFromItem(this));
            --par1ItemStack.stackSize;
            return true;
        }
    }
    else
    {
        return false;
    }
}
项目:ExpandedRailsMod    文件:ItemRecord.java   
/**
 * Called when a Block is right-clicked with this Item
 */
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
    IBlockState iblockstate = worldIn.getBlockState(pos);

    if (iblockstate.getBlock() == Blocks.JUKEBOX && !((Boolean)iblockstate.getValue(BlockJukebox.HAS_RECORD)).booleanValue())
    {
        if (!worldIn.isRemote)
        {
            ((BlockJukebox)Blocks.JUKEBOX).insertRecord(worldIn, pos, iblockstate, stack);
            worldIn.playEvent((EntityPlayer)null, 1010, pos, Item.getIdFromItem(this));
            --stack.stackSize;
            playerIn.addStat(StatList.RECORD_PLAYED);
        }

        return EnumActionResult.SUCCESS;
    }
    else
    {
        return EnumActionResult.PASS;
    }
}
项目:Cauldron    文件:ItemRecord.java   
public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_)
{
    if (p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_) == Blocks.jukebox && p_77648_3_.getBlockMetadata(p_77648_4_, p_77648_5_, p_77648_6_) == 0)
    {
        if (p_77648_3_.isRemote)
        {
            return true;
        }
        else
        {
            ((BlockJukebox)Blocks.jukebox).func_149926_b(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, p_77648_1_);
            p_77648_3_.playAuxSFXAtEntity((EntityPlayer)null, 1005, p_77648_4_, p_77648_5_, p_77648_6_, Item.getIdFromItem(this));
            --p_77648_1_.stackSize;
            return true;
        }
    }
    else
    {
        return false;
    }
}
项目:Cauldron    文件:ItemRecord.java   
public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_)
{
    if (p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_) == Blocks.jukebox && p_77648_3_.getBlockMetadata(p_77648_4_, p_77648_5_, p_77648_6_) == 0)
    {
        if (p_77648_3_.isRemote)
        {
            return true;
        }
        else
        {
            ((BlockJukebox)Blocks.jukebox).func_149926_b(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, p_77648_1_);
            p_77648_3_.playAuxSFXAtEntity((EntityPlayer)null, 1005, p_77648_4_, p_77648_5_, p_77648_6_, Item.getIdFromItem(this));
            --p_77648_1_.stackSize;
            return true;
        }
    }
    else
    {
        return false;
    }
}
项目:ShadowsOfPhysis    文件:BlockHighlightHandler.java   
@SubscribeEvent
public void onDrawBlockHighlight(DrawBlockHighlightEvent event) {
    int x = event.target.blockX;
    int y = event.target.blockY;
    int z = event.target.blockZ;

    World world = event.player.worldObj;

    if (world != null) {
        Block block = world.getBlock(x, y, z);
        if (block == Blocks.jukebox) {
            TileEntity te = world.getTileEntity(x, y, z);
            if (te instanceof BlockJukebox.TileEntityJukebox) {
                //BlockJukebox.TileEntityJukebox jb = (BlockJukebox.TileEntityJukebox) te;

                Physis.logger.info("test");
            }
        }
    }
}
项目:NeatCraft    文件:ItemRecordNC.java   
@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10)
{
    if (world.getBlock(x, y, z) == Blocks.jukebox && world.getBlockMetadata(x, y, z) == 0)
    {
        if (world.isRemote)
            return true;
        else
        {
            ((BlockJukebox)Blocks.jukebox).func_149926_b(world, x, y, z, itemStack);
            world.playAuxSFXAtEntity((EntityPlayer)null, 1005, x, y, z, Item.getIdFromItem(this));
            --itemStack.stackSize;
            return true;
        }
    }
    else
        return false;
}
项目:CreepyPastaCraft    文件:ItemCPCRecord.java   
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player,
                         World world, int x, int y, int z,
                         int par7, float par8, float par9, float par10) {
    if (world.getBlock(x, y, z) == Blocks.jukebox && world.getBlockMetadata(x, y, z) == 0) {
        if (world.isRemote) {
            return true;
        } else {
            //TODO:                       .insertRecord()
            ((BlockJukebox) Blocks.jukebox).func_149926_b(world, x, y, z, stack);
            world.playAuxSFXAtEntity(null, 1005, x, y, z, Item.getIdFromItem(this));
            --stack.stackSize;
            return true;
        }
    } else {
        return false;
    }
}
项目:TurtleMod    文件:MusicDisc.java   
public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
    IBlockState iblockstate = worldIn.getBlockState(pos);

    if (iblockstate.getBlock() == Blocks.JUKEBOX && !((Boolean)iblockstate.getValue(BlockJukebox.HAS_RECORD)).booleanValue())
    {
        if (!worldIn.isRemote)
        {
            ItemStack itemstack = player.getHeldItem(hand);
            ((BlockJukebox)Blocks.JUKEBOX).insertRecord(worldIn, pos, iblockstate, itemstack);
            worldIn.playEvent((EntityPlayer)null, 1010, pos, Item.getIdFromItem(this));
            itemstack.shrink(1);
            player.addStat(StatList.RECORD_PLAYED);
        }

        return EnumActionResult.SUCCESS;
    }
    else
    {
        return EnumActionResult.PASS;
    }
}
项目:Rediscovered-Mod-1.6.4    文件:ItemCalmRecord.java   
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
        {
            if (par3World.getBlockId(par4, par5, par6) == Block.jukebox.blockID && par3World.getBlockMetadata(par4, par5, par6) == 0 && !mod_Rediscovered.Calm4MusicDisk)
            {
                if (par3World.isRemote)
                {
                    return true;
                }
                else
                {
                    ((BlockJukeBox)Block.jukebox).insertRecord(par3World, par4, par5, par6, par1ItemStack);
//                  par3World.playAuxSFXAtEntity((EntityPlayer)null, 1005, par4, par5, par6, this.itemID);
//                  par3World.playSoundAtEntity(par2EntityPlayer, mod_Rediscovered.modid + ":calm", 2.0F, 1.0F);
                    --par1ItemStack.stackSize;
                    return true;
                }
            }
            else
            {
                return false;
            }
        }
项目:RuneCraftery    文件:ItemRecord.java   
/**
 * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
 * True if something happen and false if it don't. This is for ITEMS, not BLOCKS
 */
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{
    if (par3World.getBlockId(par4, par5, par6) == Block.jukebox.blockID && par3World.getBlockMetadata(par4, par5, par6) == 0)
    {
        if (par3World.isRemote)
        {
            return true;
        }
        else
        {
            ((BlockJukeBox)Block.jukebox).insertRecord(par3World, par4, par5, par6, par1ItemStack);
            par3World.playAuxSFXAtEntity((EntityPlayer)null, 1005, par4, par5, par6, this.itemID);
            --par1ItemStack.stackSize;
            return true;
        }
    }
    else
    {
        return false;
    }
}
项目:BetterNutritionMod    文件:ItemRecord.java   
/**
 * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
 * True if something happen and false if it don't. This is for ITEMS, not BLOCKS
 */
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{
    if (par3World.getBlockId(par4, par5, par6) == Block.jukebox.blockID && par3World.getBlockMetadata(par4, par5, par6) == 0)
    {
        if (par3World.isRemote)
        {
            return true;
        }
        else
        {
            ((BlockJukeBox)Block.jukebox).insertRecord(par3World, par4, par5, par6, par1ItemStack);
            par3World.playAuxSFXAtEntity((EntityPlayer)null, 1005, par4, par5, par6, this.itemID);
            --par1ItemStack.stackSize;
            return true;
        }
    }
    else
    {
        return false;
    }
}
项目:Kingdom-Keys-Re-Coded    文件:ItemKKRecord.java   
@Override
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
    IBlockState iblockstate = world.getBlockState(pos);
    if (iblockstate.getBlock() == Blocks.JUKEBOX && !((Boolean)iblockstate.getValue(BlockJukebox.HAS_RECORD)).booleanValue()) {
        if (!world.isRemote) {
            ((BlockJukebox)Blocks.JUKEBOX).insertRecord(world, pos, iblockstate, player.getActiveItemStack());
            world.playEvent((EntityPlayer)null, 1010, pos, Item.getIdFromItem(this));
            player.getActiveItemStack().setCount(player.getActiveItemStack().getCount()-1);
            player.addStat(StatList.RECORD_PLAYED);
        }
        return EnumActionResult.SUCCESS;
    }
    else
        return EnumActionResult.PASS;
}
项目:RuneCraftery    文件:ItemRecord.java   
public boolean func_77648_a(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) {
   if(p_77648_3_.func_72798_a(p_77648_4_, p_77648_5_, p_77648_6_) == Block.field_72032_aY.field_71990_ca && p_77648_3_.func_72805_g(p_77648_4_, p_77648_5_, p_77648_6_) == 0) {
      if(p_77648_3_.field_72995_K) {
         return true;
      } else {
         ((BlockJukeBox)Block.field_72032_aY).func_85106_a(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, p_77648_1_);
         p_77648_3_.func_72889_a((EntityPlayer)null, 1005, p_77648_4_, p_77648_5_, p_77648_6_, this.field_77779_bT);
         --p_77648_1_.field_77994_a;
         return true;
      }
   } else {
      return false;
   }
}
项目:pnc-repressurized    文件:HackableJukebox.java   
@Override
public boolean canHack(IBlockAccess world, BlockPos pos, EntityPlayer player) {
    return world.getBlockState(pos).getValue(BlockJukebox.HAS_RECORD);
}
项目:Uranium    文件:CraftJukebox.java   
public boolean eject() {
    boolean result = isPlaying();
    ((BlockJukebox) Blocks.jukebox).func_149925_e(world.getHandle(), getX(), getY(), getZ());
    return result;
}
项目:CustomWorldGen    文件:DataFixesManager.java   
public static DataFixer createFixer()
{
    DataFixer datafixer = new DataFixer(512);
    WorldInfo.registerFixes(datafixer);
    EntityPlayer.registerFixesPlayer(datafixer);
    AnvilChunkLoader.registerFixes(datafixer);
    ItemStack.registerFixes(datafixer);
    EntityArmorStand.registerFixesArmorStand(datafixer);
    EntityArrow.registerFixesArrow(datafixer);
    EntityBat.registerFixesBat(datafixer);
    EntityBlaze.registerFixesBlaze(datafixer);
    EntityCaveSpider.registerFixesCaveSpider(datafixer);
    EntityChicken.registerFixesChicken(datafixer);
    EntityCow.registerFixesCow(datafixer);
    EntityCreeper.registerFixesCreeper(datafixer);
    EntityDragonFireball.registerFixesDragonFireball(datafixer);
    EntityDragon.registerFixesDragon(datafixer);
    EntityEnderman.registerFixesEnderman(datafixer);
    EntityEndermite.registerFixesEndermite(datafixer);
    EntityFallingBlock.registerFixesFallingBlock(datafixer);
    EntityLargeFireball.registerFixesLargeFireball(datafixer);
    EntityFireworkRocket.registerFixesFireworkRocket(datafixer);
    EntityGhast.registerFixesGhast(datafixer);
    EntityGiantZombie.registerFixesGiantZombie(datafixer);
    EntityGuardian.registerFixesGuardian(datafixer);
    EntityHorse.registerFixesHorse(datafixer);
    EntityItem.registerFixesItem(datafixer);
    EntityItemFrame.registerFixesItemFrame(datafixer);
    EntityMagmaCube.registerFixesMagmaCube(datafixer);
    EntityMinecartChest.registerFixesMinecartChest(datafixer);
    EntityMinecartCommandBlock.registerFixesMinecartCommand(datafixer);
    EntityMinecartFurnace.registerFixesMinecartFurnace(datafixer);
    EntityMinecartHopper.registerFixesMinecartHopper(datafixer);
    EntityMinecartEmpty.registerFixesMinecartEmpty(datafixer);
    EntityMinecartMobSpawner.registerFixesMinecartMobSpawner(datafixer);
    EntityMinecartTNT.registerFixesMinecartTNT(datafixer);
    EntityLiving.registerFixesMob(datafixer);
    EntityMob.registerFixesMonster(datafixer);
    EntityMooshroom.registerFixesMooshroom(datafixer);
    EntityOcelot.registerFixesOcelot(datafixer);
    EntityPig.registerFixesPig(datafixer);
    EntityPigZombie.registerFixesPigZombie(datafixer);
    EntityRabbit.registerFixesRabbit(datafixer);
    EntitySheep.registerFixesSheep(datafixer);
    EntityShulker.registerFixesShulker(datafixer);
    EntitySilverfish.registerFixesSilverfish(datafixer);
    EntitySkeleton.registerFixesSkeleton(datafixer);
    EntitySlime.registerFixesSlime(datafixer);
    EntitySmallFireball.registerFixesSmallFireball(datafixer);
    EntitySnowman.registerFixesSnowman(datafixer);
    EntitySnowball.registerFixesSnowball(datafixer);
    EntitySpectralArrow.registerFixesSpectralArrow(datafixer);
    EntitySpider.registerFixesSpider(datafixer);
    EntitySquid.registerFixesSquid(datafixer);
    EntityEgg.registerFixesEgg(datafixer);
    EntityEnderPearl.registerFixesEnderPearl(datafixer);
    EntityExpBottle.registerFixesExpBottle(datafixer);
    EntityPotion.registerFixesPotion(datafixer);
    EntityTippedArrow.registerFixesTippedArrow(datafixer);
    EntityVillager.registerFixesVillager(datafixer);
    EntityIronGolem.registerFixesIronGolem(datafixer);
    EntityWitch.registerFixesWitch(datafixer);
    EntityWither.registerFixesWither(datafixer);
    EntityWitherSkull.registerFixesWitherSkull(datafixer);
    EntityWolf.registerFixesWolf(datafixer);
    EntityZombie.registerFixesZombie(datafixer);
    TileEntityPiston.registerFixesPiston(datafixer);
    TileEntityFlowerPot.registerFixesFlowerPot(datafixer);
    TileEntityFurnace.registerFixesFurnace(datafixer);
    TileEntityChest.registerFixesChest(datafixer);
    TileEntityDispenser.registerFixes(datafixer);
    TileEntityDropper.registerFixesDropper(datafixer);
    TileEntityBrewingStand.registerFixesBrewingStand(datafixer);
    TileEntityHopper.registerFixesHopper(datafixer);
    BlockJukebox.registerFixesJukebox(datafixer);
    TileEntityMobSpawner.registerFixesMobSpawner(datafixer);
    registerFixes(datafixer);
    return datafixer;
}
项目:ThermosRebased    文件:CraftJukebox.java   
public boolean eject() {
    boolean result = isPlaying();
    ((BlockJukebox) Blocks.jukebox).func_149925_e(world.getHandle(), getX(), getY(), getZ());
    return result;
}
项目:Thermos    文件:CraftJukebox.java   
public boolean eject() {
    boolean result = isPlaying();
    ((BlockJukebox) Blocks.jukebox).func_149925_e(world.getHandle(), getX(), getY(), getZ());
    return result;
}
项目:KCauldron    文件:CraftJukebox.java   
public boolean eject() {
    boolean result = isPlaying();
    ((BlockJukebox) Blocks.jukebox).func_149925_e(world.getHandle(), getX(), getY(), getZ());
    return result;
}
项目:CauldronGit    文件:CraftJukebox.java   
public boolean eject() {
    boolean result = isPlaying();
    ((BlockJukebox) Blocks.jukebox).func_149925_e(world.getHandle(), getX(), getY(), getZ());
    return result;
}
项目:Cauldron-Old    文件:CraftJukebox.java   
public boolean eject() {
    boolean result = isPlaying();
    ((BlockJukebox) Blocks.jukebox).func_149925_e(world.getHandle(), getX(), getY(), getZ());
    return result;
}
项目:Cauldron-Reloaded    文件:CraftJukebox.java   
public boolean eject() {
    boolean result = isPlaying();
    ((BlockJukebox) Blocks.jukebox).func_149925_e(world.getHandle(), getX(), getY(), getZ());
    return result;
}
项目:FFoKC    文件:CraftJukebox.java   
public boolean eject() {
    boolean result = isPlaying();
    ((BlockJukebox) Blocks.jukebox).func_149925_e(world.getHandle(), getX(), getY(), getZ());
    return result;
}
项目:Cauldron    文件:CraftJukebox.java   
public boolean eject() {
    boolean result = isPlaying();
    ((BlockJukebox) Blocks.jukebox).func_149925_e(world.getHandle(), getX(), getY(), getZ());
    return result;
}
项目:HoloInventory    文件:TileRequest.java   
@Override
public ResponseMessage onMessage(TileRequest message, MessageContext ctx)
{
    World world = DimensionManager.getWorld(message.dim);
    if (world == null) return null;
    TileEntity te = world.getTileEntity(message.pos);
    if (te == null) return null;

    if (Helper.banned.contains(te.getClass().getCanonicalName())) return null;
    if (te instanceof ILockableContainer && !ctx.getServerHandler().player.canOpen(((ILockableContainer) te).getLockCode())) return null;

    if (te instanceof TileEntityEnderChest)
    {
        return new PlainInventory(message.pos, ctx.getServerHandler().player.getInventoryEnderChest());
    }
    else if (te instanceof BlockJukebox.TileEntityJukebox)
    {
        InventoryBasic ib = new InventoryBasic("minecraft:jukebox", false, 1);
        ib.setInventorySlotContents(0, ((BlockJukebox.TileEntityJukebox) te).getRecord());
        return new PlainInventory(message.pos, ib).setName(Blocks.JUKEBOX.getUnlocalizedName());
    }
    else if (te instanceof TileEntityChest)
    {
        Block b = world.getBlockState(message.pos).getBlock();
        if (b instanceof BlockChest)
        {
            IInventory i = ((BlockChest) b).getLockableContainer(world, message.pos);
            if (i != null) return new PlainInventory(message.pos, i);
            return null;
        }
        return new PlainInventory(message.pos, ((TileEntityChest) te));
    }
    else if (te instanceof IInventory)
    {
        return new PlainInventory(message.pos, (IInventory) te);
    }
    else if (te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null))
    {
        IItemHandler iih = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
        if (iih == null)
        {
            HoloInventory.getLogger().warn("Error: Block at {} (Class: {} Te: {} Block: {}) returned null after indicating the capability is available.", message.pos, te.getClass().getName(), te, te.getBlockType());
            return null;
        }
        return new PlainInventory(message.pos, te.getBlockType().getUnlocalizedName(), iih);
    }

    return null;
}
项目:HoloInventory    文件:Helper.java   
public static boolean accept(TileEntity te)
{
    return te != null && (te instanceof IInventory || te instanceof BlockJukebox.TileEntityJukebox || te instanceof TileEntityEnderChest || te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null));
}