当前位置: 首页>>代码示例>>Java>>正文


Java TileEntityEnchantmentTable类代码示例

本文整理汇总了Java中net.minecraft.tileentity.TileEntityEnchantmentTable的典型用法代码示例。如果您正苦于以下问题:Java TileEntityEnchantmentTable类的具体用法?Java TileEntityEnchantmentTable怎么用?Java TileEntityEnchantmentTable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TileEntityEnchantmentTable类属于net.minecraft.tileentity包,在下文中一共展示了TileEntityEnchantmentTable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onBlockActivated

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
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;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:19,代码来源:BlockEnchantmentTable.java

示例2: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
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);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:19,代码来源:TileEntityRendererDispatcher.java

示例3: onBlockActivated

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
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;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:19,代码来源:BlockEnchantmentTable.java

示例4: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
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);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:22,代码来源:TileEntityRendererDispatcher.java

示例5: onBlockActivated

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
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;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:19,代码来源:BlockEnchantmentTable.java

示例6: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
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);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:21,代码来源:TileEntityRendererDispatcher.java

示例7: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
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);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:20,代码来源:TileEntityRendererDispatcher.java

示例8: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
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);
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:20,代码来源:TileEntityRendererDispatcher.java

示例9: TileEntityRenderer

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
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);
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:20,代码来源:TileEntityRenderer.java

示例10: onBlockPlacedBy

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
/**
 * 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());
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:18,代码来源:BlockEnchantmentTable.java

示例11: makeEntityRender

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
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;
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:30,代码来源:ModelAdapterBook.java

示例12: getBookTexture

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
public static ResourceLocation getBookTexture(TileEntityEnchantmentTable table) {
	RenderBookTextureEvent event = new RenderBookTextureEvent();
	event.bookTexture = defaultBook;
	event.table = table;
	MinecraftForge.EVENT_BUS.post(event);
	return event.bookTexture;
}
 
开发者ID:austinv11,项目名称:CollectiveFramework,代码行数:8,代码来源:ClientHooks.java

示例13: validate

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
@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;
}
 
开发者ID:austinv11,项目名称:DartCraft2,代码行数:11,代码来源:TileEntityInfuser.java

示例14: onBlockActivated

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
/**
 * 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;
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:17,代码来源:BlockEnchantmentTable.java

示例15: onBlockPlacedBy

import net.minecraft.tileentity.TileEntityEnchantmentTable; //导入依赖的package包/类
/**
 * 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());
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:13,代码来源:BlockEnchantmentTable.java


注:本文中的net.minecraft.tileentity.TileEntityEnchantmentTable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。