Java 类net.minecraft.tileentity.TileEntityEnchantmentTable 实例源码

项目:DecompiledMinecraft    文件:BlockEnchantmentTable.java   
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
项目:DecompiledMinecraft    文件:BlockEnchantmentTable.java   
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
项目:DecompiledMinecraft    文件:TileEntityRendererDispatcher.java   
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer());

    for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values())
    {
        tileentityspecialrenderer.setRendererDispatcher(this);
    }
}
项目:BaseClient    文件:BlockEnchantmentTable.java   
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
项目:BaseClient    文件:TileEntityRendererDispatcher.java   
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer());

    for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values())
    {
        tileentityspecialrenderer.setRendererDispatcher(this);
    }
}
项目:BaseClient    文件:BlockEnchantmentTable.java   
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
项目:BaseClient    文件:TileEntityRendererDispatcher.java   
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer());

    for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values())
    {
        tileentityspecialrenderer.setRendererDispatcher(this);
    }
}
项目:Backmemed    文件:BlockEnchantmentTable.java   
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing heldItem, float side, float hitX, float hitY)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
项目:Backmemed    文件:TileEntityRendererDispatcher.java   
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer());
    this.mapSpecialRenderers.put(TileEntityEndGateway.class, new TileEntityEndGatewayRenderer());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer());
    this.mapSpecialRenderers.put(TileEntityStructure.class, new TileEntityStructureRenderer());
    this.mapSpecialRenderers.put(TileEntityShulkerBox.class, new TileEntityShulkerBoxRenderer(new ModelShulker()));

    for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values())
    {
        tileentityspecialrenderer.setRendererDispatcher(this);
    }
}
项目:CustomWorldGen    文件:BlockEnchantmentTable.java   
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
项目:CustomWorldGen    文件:TileEntityRendererDispatcher.java   
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer());
    this.mapSpecialRenderers.put(TileEntityEndGateway.class, new TileEntityEndGatewayRenderer());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer());
    this.mapSpecialRenderers.put(TileEntityStructure.class, new TileEntityStructureRenderer());

    for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values())
    {
        tileentityspecialrenderer.setRendererDispatcher(this);
    }
}
项目:Resilience-Client-Source    文件:TileEntityRendererDispatcher.java   
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityRendererPiston());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new RenderEnchantmentTable());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new RenderEndPortal());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    Iterator var1 = this.mapSpecialRenderers.values().iterator();

    while (var1.hasNext())
    {
        TileEntitySpecialRenderer var2 = (TileEntitySpecialRenderer)var1.next();
        var2.func_147497_a(this);
    }
}
项目:ExpandedRailsMod    文件:BlockEnchantmentTable.java   
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
项目:ExpandedRailsMod    文件:TileEntityRendererDispatcher.java   
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer());
    this.mapSpecialRenderers.put(TileEntityEndGateway.class, new TileEntityEndGatewayRenderer());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer());
    this.mapSpecialRenderers.put(TileEntityStructure.class, new TileEntityStructureRenderer());

    for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values())
    {
        tileentityspecialrenderer.setRendererDispatcher(this);
    }
}
项目:Cauldron    文件:TileEntityRendererDispatcher.java   
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityRendererPiston());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new RenderEnchantmentTable());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new RenderEndPortal());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    Iterator iterator = this.mapSpecialRenderers.values().iterator();

    while (iterator.hasNext())
    {
        TileEntitySpecialRenderer tileentityspecialrenderer = (TileEntitySpecialRenderer)iterator.next();
        tileentityspecialrenderer.func_147497_a(this);
    }
}
项目:Cauldron    文件:TileEntityRendererDispatcher.java   
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityRendererPiston());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new RenderEnchantmentTable());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new RenderEndPortal());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    Iterator iterator = this.mapSpecialRenderers.values().iterator();

    while (iterator.hasNext())
    {
        TileEntitySpecialRenderer tileentityspecialrenderer = (TileEntitySpecialRenderer)iterator.next();
        tileentityspecialrenderer.func_147497_a(this);
    }
}
项目:RuneCraftery    文件:TileEntityRenderer.java   
private TileEntityRenderer() {
   this.field_76966_m.put(TileEntitySign.class, new TileEntitySignRenderer());
   this.field_76966_m.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
   this.field_76966_m.put(TileEntityPiston.class, new TileEntityRendererPiston());
   this.field_76966_m.put(TileEntityChest.class, new TileEntityChestRenderer());
   this.field_76966_m.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
   this.field_76966_m.put(TileEntityEnchantmentTable.class, new RenderEnchantmentTable());
   this.field_76966_m.put(TileEntityEndPortal.class, new RenderEndPortal());
   this.field_76966_m.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
   this.field_76966_m.put(TileEntitySkull.class, new TileEntitySkullRenderer());
   Iterator var1 = this.field_76966_m.values().iterator();

   while(var1.hasNext()) {
      TileEntitySpecialRenderer var2 = (TileEntitySpecialRenderer)var1.next();
      var2.func_76893_a(this);
   }

}
项目:RuneCraftery    文件:TileEntityRenderer.java   
private TileEntityRenderer()
{
    this.specialRendererMap.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.specialRendererMap.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.specialRendererMap.put(TileEntityPiston.class, new TileEntityRendererPiston());
    this.specialRendererMap.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.specialRendererMap.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.specialRendererMap.put(TileEntityEnchantmentTable.class, new RenderEnchantmentTable());
    this.specialRendererMap.put(TileEntityEndPortal.class, new RenderEndPortal());
    this.specialRendererMap.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.specialRendererMap.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    Iterator iterator = this.specialRendererMap.values().iterator();

    while (iterator.hasNext())
    {
        TileEntitySpecialRenderer tileentityspecialrenderer = (TileEntitySpecialRenderer)iterator.next();
        tileentityspecialrenderer.setTileEntityRenderer(this);
    }
}
项目:BetterNutritionMod    文件:TileEntityRenderer.java   
private TileEntityRenderer()
{
    this.specialRendererMap.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.specialRendererMap.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.specialRendererMap.put(TileEntityPiston.class, new TileEntityRendererPiston());
    this.specialRendererMap.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.specialRendererMap.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.specialRendererMap.put(TileEntityEnchantmentTable.class, new RenderEnchantmentTable());
    this.specialRendererMap.put(TileEntityEndPortal.class, new RenderEndPortal());
    this.specialRendererMap.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.specialRendererMap.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    Iterator iterator = this.specialRendererMap.values().iterator();

    while (iterator.hasNext())
    {
        TileEntitySpecialRenderer tileentityspecialrenderer = (TileEntitySpecialRenderer)iterator.next();
        tileentityspecialrenderer.setTileEntityRenderer(this);
    }
}
项目:DecompiledMinecraft    文件:BlockEnchantmentTable.java   
/**
 * Called by ItemBlocks after a block is set in the world, to allow post-place logic
 */
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
    super.onBlockPlacedBy(worldIn, pos, state, placer, stack);

    if (stack.hasDisplayName())
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            ((TileEntityEnchantmentTable)tileentity).setCustomName(stack.getDisplayName());
        }
    }
}
项目:DecompiledMinecraft    文件:BlockEnchantmentTable.java   
/**
 * Called by ItemBlocks after a block is set in the world, to allow post-place logic
 */
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
    super.onBlockPlacedBy(worldIn, pos, state, placer, stack);

    if (stack.hasDisplayName())
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            ((TileEntityEnchantmentTable)tileentity).setCustomName(stack.getDisplayName());
        }
    }
}
项目:BaseClient    文件:BlockEnchantmentTable.java   
/**
 * Called by ItemBlocks after a block is set in the world, to allow post-place logic
 */
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
    super.onBlockPlacedBy(worldIn, pos, state, placer, stack);

    if (stack.hasDisplayName())
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            ((TileEntityEnchantmentTable)tileentity).setCustomName(stack.getDisplayName());
        }
    }
}
项目:BaseClient    文件:BlockEnchantmentTable.java   
/**
 * Called by ItemBlocks after a block is set in the world, to allow post-place logic
 */
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
    super.onBlockPlacedBy(worldIn, pos, state, placer, stack);

    if (stack.hasDisplayName())
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            ((TileEntityEnchantmentTable)tileentity).setCustomName(stack.getDisplayName());
        }
    }
}
项目:Backmemed    文件:ModelAdapterBook.java   
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    TileEntityRendererDispatcher tileentityrendererdispatcher = TileEntityRendererDispatcher.instance;
    TileEntitySpecialRenderer tileentityspecialrenderer = tileentityrendererdispatcher.getSpecialRendererByClass(TileEntityEnchantmentTable.class);

    if (!(tileentityspecialrenderer instanceof TileEntityEnchantmentTableRenderer))
    {
        return null;
    }
    else
    {
        if (tileentityspecialrenderer.getEntityClass() == null)
        {
            tileentityspecialrenderer = new TileEntityEnchantmentTableRenderer();
            tileentityspecialrenderer.setRendererDispatcher(tileentityrendererdispatcher);
        }

        if (!Reflector.TileEntityEnchantmentTableRenderer_modelBook.exists())
        {
            Config.warn("Field not found: TileEntityEnchantmentTableRenderer.modelBook");
            return null;
        }
        else
        {
            Reflector.setFieldValue(tileentityspecialrenderer, Reflector.TileEntityEnchantmentTableRenderer_modelBook, modelBase);
            return tileentityspecialrenderer;
        }
    }
}
项目:Backmemed    文件:BlockEnchantmentTable.java   
/**
 * Called by ItemBlocks after a block is set in the world, to allow post-place logic
 */
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
    super.onBlockPlacedBy(worldIn, pos, state, placer, stack);

    if (stack.hasDisplayName())
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            ((TileEntityEnchantmentTable)tileentity).setCustomName(stack.getDisplayName());
        }
    }
}
项目:CustomWorldGen    文件:BlockEnchantmentTable.java   
/**
 * Called by ItemBlocks after a block is set in the world, to allow post-place logic
 */
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
    super.onBlockPlacedBy(worldIn, pos, state, placer, stack);

    if (stack.hasDisplayName())
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            ((TileEntityEnchantmentTable)tileentity).setCustomName(stack.getDisplayName());
        }
    }
}
项目:CollectiveFramework    文件:ClientHooks.java   
public static ResourceLocation getBookTexture(TileEntityEnchantmentTable table) {
    RenderBookTextureEvent event = new RenderBookTextureEvent();
    event.bookTexture = defaultBook;
    event.table = table;
    MinecraftForge.EVENT_BUS.post(event);
    return event.bookTexture;
}
项目:DartCraft2    文件:TileEntityInfuser.java   
@Override
public void validate() {
    super.validate();
    dummyTable = new TileEntityEnchantmentTable();
    dummyTable.setWorldObj(this.getWorldObj());
    dummyTable.xCoord = this.xCoord;
    dummyTable.yCoord = this.yCoord;
    dummyTable.zCoord = this.zCoord;
    dummyTable.blockMetadata = Integer.MIN_VALUE;
}
项目:Resilience-Client-Source    文件:BlockEnchantmentTable.java   
/**
 * Called upon block activation (right click on the block.)
 */
public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)
{
    if (p_149727_1_.isClient)
    {
        return true;
    }
    else
    {
        TileEntityEnchantmentTable var10 = (TileEntityEnchantmentTable)p_149727_1_.getTileEntity(p_149727_2_, p_149727_3_, p_149727_4_);
        p_149727_5_.displayGUIEnchantment(p_149727_2_, p_149727_3_, p_149727_4_, var10.func_145921_b() ? var10.func_145919_a() : null);
        return true;
    }
}
项目:Resilience-Client-Source    文件:BlockEnchantmentTable.java   
/**
 * Called when the block is placed in the world.
 */
public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_)
{
    super.onBlockPlacedBy(p_149689_1_, p_149689_2_, p_149689_3_, p_149689_4_, p_149689_5_, p_149689_6_);

    if (p_149689_6_.hasDisplayName())
    {
        ((TileEntityEnchantmentTable)p_149689_1_.getTileEntity(p_149689_2_, p_149689_3_, p_149689_4_)).func_145920_a(p_149689_6_.getDisplayName());
    }
}
项目:ExpandedRailsMod    文件:BlockEnchantmentTable.java   
/**
 * Called by ItemBlocks after a block is set in the world, to allow post-place logic
 */
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
    super.onBlockPlacedBy(worldIn, pos, state, placer, stack);

    if (stack.hasDisplayName())
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            ((TileEntityEnchantmentTable)tileentity).setCustomName(stack.getDisplayName());
        }
    }
}
项目:Cauldron    文件:BlockEnchantmentTable.java   
public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)
{
    if (p_149727_1_.isRemote)
    {
        return true;
    }
    else
    {
        TileEntityEnchantmentTable tileentityenchantmenttable = (TileEntityEnchantmentTable)p_149727_1_.getTileEntity(p_149727_2_, p_149727_3_, p_149727_4_);
        p_149727_5_.displayGUIEnchantment(p_149727_2_, p_149727_3_, p_149727_4_, tileentityenchantmenttable.func_145921_b() ? tileentityenchantmenttable.func_145919_a() : null);
        return true;
    }
}
项目:Cauldron    文件:BlockEnchantmentTable.java   
public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_)
{
    super.onBlockPlacedBy(p_149689_1_, p_149689_2_, p_149689_3_, p_149689_4_, p_149689_5_, p_149689_6_);

    if (p_149689_6_.hasDisplayName())
    {
        ((TileEntityEnchantmentTable)p_149689_1_.getTileEntity(p_149689_2_, p_149689_3_, p_149689_4_)).func_145920_a(p_149689_6_.getDisplayName());
    }
}
项目:Cauldron    文件:BlockEnchantmentTable.java   
public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)
{
    if (p_149727_1_.isRemote)
    {
        return true;
    }
    else
    {
        TileEntityEnchantmentTable tileentityenchantmenttable = (TileEntityEnchantmentTable)p_149727_1_.getTileEntity(p_149727_2_, p_149727_3_, p_149727_4_);
        p_149727_5_.displayGUIEnchantment(p_149727_2_, p_149727_3_, p_149727_4_, tileentityenchantmenttable.func_145921_b() ? tileentityenchantmenttable.func_145919_a() : null);
        return true;
    }
}
项目:Cauldron    文件:BlockEnchantmentTable.java   
public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_)
{
    super.onBlockPlacedBy(p_149689_1_, p_149689_2_, p_149689_3_, p_149689_4_, p_149689_5_, p_149689_6_);

    if (p_149689_6_.hasDisplayName())
    {
        ((TileEntityEnchantmentTable)p_149689_1_.getTileEntity(p_149689_2_, p_149689_3_, p_149689_4_)).func_145920_a(p_149689_6_.getDisplayName());
    }
}
项目:RuneCraftery    文件:BlockEnchantmentTable.java   
public boolean func_71903_a(World p_71903_1_, int p_71903_2_, int p_71903_3_, int p_71903_4_, EntityPlayer p_71903_5_, int p_71903_6_, float p_71903_7_, float p_71903_8_, float p_71903_9_) {
   if(p_71903_1_.field_72995_K) {
      return true;
   } else {
      TileEntityEnchantmentTable var10 = (TileEntityEnchantmentTable)p_71903_1_.func_72796_p(p_71903_2_, p_71903_3_, p_71903_4_);
      p_71903_5_.func_71002_c(p_71903_2_, p_71903_3_, p_71903_4_, var10.func_94135_b()?var10.func_94133_a():null);
      return true;
   }
}
项目:RuneCraftery    文件:BlockEnchantmentTable.java   
public void func_71860_a(World p_71860_1_, int p_71860_2_, int p_71860_3_, int p_71860_4_, EntityLivingBase p_71860_5_, ItemStack p_71860_6_) {
   super.func_71860_a(p_71860_1_, p_71860_2_, p_71860_3_, p_71860_4_, p_71860_5_, p_71860_6_);
   if(p_71860_6_.func_82837_s()) {
      ((TileEntityEnchantmentTable)p_71860_1_.func_72796_p(p_71860_2_, p_71860_3_, p_71860_4_)).func_94134_a(p_71860_6_.func_82833_r());
   }

}
项目:RuneCraftery    文件:BlockEnchantmentTable.java   
/**
 * Called upon block activation (right click on the block.)
 */
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
    if (par1World.isRemote)
    {
        return true;
    }
    else
    {
        TileEntityEnchantmentTable tileentityenchantmenttable = (TileEntityEnchantmentTable)par1World.getBlockTileEntity(par2, par3, par4);
        par5EntityPlayer.displayGUIEnchantment(par2, par3, par4, tileentityenchantmenttable.func_94135_b() ? tileentityenchantmenttable.func_94133_a() : null);
        return true;
    }
}
项目:RuneCraftery    文件:BlockEnchantmentTable.java   
/**
 * Called when the block is placed in the world.
 */
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack)
{
    super.onBlockPlacedBy(par1World, par2, par3, par4, par5EntityLivingBase, par6ItemStack);

    if (par6ItemStack.hasDisplayName())
    {
        ((TileEntityEnchantmentTable)par1World.getBlockTileEntity(par2, par3, par4)).func_94134_a(par6ItemStack.getDisplayName());
    }
}
项目:BetterNutritionMod    文件:BlockEnchantmentTable.java   
/**
 * Called upon block activation (right click on the block.)
 */
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
    if (par1World.isRemote)
    {
        return true;
    }
    else
    {
        TileEntityEnchantmentTable tileentityenchantmenttable = (TileEntityEnchantmentTable)par1World.getBlockTileEntity(par2, par3, par4);
        par5EntityPlayer.displayGUIEnchantment(par2, par3, par4, tileentityenchantmenttable.func_94135_b() ? tileentityenchantmenttable.func_94133_a() : null);
        return true;
    }
}