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

项目: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    文件:StorageEsp.java   
@EventTarget
private void onRender(final Render3DEvent event) {
    GlStateManager.pushMatrix();
    for (final Object o : this.mc.theWorld.loadedTileEntityList) {
        final TileEntity ent = (TileEntity)o;
        if (!(ent instanceof TileEntityChest) && !(ent instanceof TileEntityDispenser) && !(ent instanceof TileEntityEnderChest)) {
            continue;
        }
        if (ent instanceof TileEntityChest && !StorageEsp.chest) {
            continue;
        }
        if (ent instanceof TileEntityDispenser && !StorageEsp.dispenser) {
            continue;
        }
        if (ent instanceof TileEntityEnderChest && !StorageEsp.enderChest) {
            continue;
        }
        this.drawEsp(ent, event.partialTicks);
    }
    GlStateManager.popMatrix();
}
项目: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    文件: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    文件: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    文件: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);
    }
}
项目:enderutilities    文件:ItemEnderSword.java   
@Override
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos,
        EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
{
    ItemStack stack = player.getHeldItem(hand);
    TileEntity te = world.getTileEntity(pos);

    // When sneak-right-clicking on an inventory or an Ender Chest, and the installed Link Crystal is a block type crystal,
    // then bind the crystal to the block clicked on.
    if (player.isSneaking() && te != null &&
        (te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side) || te.getClass() == TileEntityEnderChest.class) &&
        UtilItemModular.getSelectedModuleTier(stack, ModuleType.TYPE_LINKCRYSTAL) == ItemLinkCrystal.TYPE_BLOCK)
    {
        if (world.isRemote == false)
        {
            UtilItemModular.setTarget(stack, player, pos, side, hitX, hitY, hitZ, false, false);
        }

        return EnumActionResult.SUCCESS;
    }

    return EnumActionResult.PASS;
}
项目: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    文件:BlockEnderChest.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_) {
   InventoryEnderChest var10 = p_71903_5_.func_71005_bN();
   TileEntityEnderChest var11 = (TileEntityEnderChest)p_71903_1_.func_72796_p(p_71903_2_, p_71903_3_, p_71903_4_);
   if(var10 != null && var11 != null) {
      if(p_71903_1_.func_72809_s(p_71903_2_, p_71903_3_ + 1, p_71903_4_)) {
         return true;
      } else if(p_71903_1_.field_72995_K) {
         return true;
      } else {
         var10.func_70485_a(var11);
         p_71903_5_.func_71007_a(var10);
         return true;
      }
   } else {
      return true;
   }
}
项目: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    文件:BlockEnderChest.java   
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    InventoryEnderChest inventoryenderchest = playerIn.getInventoryEnderChest();
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (inventoryenderchest != null && tileentity instanceof TileEntityEnderChest)
    {
        if (worldIn.getBlockState(pos.up()).getBlock().isNormalCube())
        {
            return true;
        }
        else if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.setChestTileEntity((TileEntityEnderChest)tileentity);
            playerIn.displayGUIChest(inventoryenderchest);
            playerIn.triggerAchievement(StatList.field_181738_V);
            return true;
        }
    }
    else
    {
        return true;
    }
}
项目:DecompiledMinecraft    文件:BlockEnderChest.java   
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    InventoryEnderChest inventoryenderchest = playerIn.getInventoryEnderChest();
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (inventoryenderchest != null && tileentity instanceof TileEntityEnderChest)
    {
        if (worldIn.getBlockState(pos.up()).getBlock().isNormalCube())
        {
            return true;
        }
        else if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.setChestTileEntity((TileEntityEnderChest)tileentity);
            playerIn.displayGUIChest(inventoryenderchest);
            playerIn.triggerAchievement(StatList.field_181738_V);
            return true;
        }
    }
    else
    {
        return true;
    }
}
项目:BaseClient    文件:StorageEsp.java   
private float[] getColor(final TileEntity ent) {
    if (ent instanceof TileEntityChest) {
        return new float[] { 0.0f, 0.9f, 0.9f };
    }
    if (ent instanceof TileEntityDispenser) {
        return new float[] { 0.29f, 0.29f, 0.29f };
    }
    if (ent instanceof TileEntityEnderChest) {
        return new float[] { 0.3f, 0.0f, 0.3f };
    }
    return new float[] { 1.0f, 1.0f, 1.0f };
}
项目:BaseClient    文件:BlockEnderChest.java   
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    InventoryEnderChest inventoryenderchest = playerIn.getInventoryEnderChest();
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (inventoryenderchest != null && tileentity instanceof TileEntityEnderChest)
    {
        if (worldIn.getBlockState(pos.up()).getBlock().isNormalCube())
        {
            return true;
        }
        else if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.setChestTileEntity((TileEntityEnderChest)tileentity);
            playerIn.displayGUIChest(inventoryenderchest);
            playerIn.triggerAchievement(StatList.field_181738_V);
            return true;
        }
    }
    else
    {
        return true;
    }
}
项目:BaseClient    文件:BlockEnderChest.java   
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    InventoryEnderChest inventoryenderchest = playerIn.getInventoryEnderChest();
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (inventoryenderchest != null && tileentity instanceof TileEntityEnderChest)
    {
        if (worldIn.getBlockState(pos.up()).getBlock().isNormalCube())
        {
            return true;
        }
        else if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.setChestTileEntity((TileEntityEnderChest)tileentity);
            playerIn.displayGUIChest(inventoryenderchest);
            playerIn.triggerAchievement(StatList.field_181738_V);
            return true;
        }
    }
    else
    {
        return true;
    }
}
项目:Backmemed    文件:ModelAdapterEnderChest.java   
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    TileEntityRendererDispatcher tileentityrendererdispatcher = TileEntityRendererDispatcher.instance;
    TileEntitySpecialRenderer tileentityspecialrenderer = tileentityrendererdispatcher.getSpecialRendererByClass(TileEntityEnderChest.class);

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

        if (!Reflector.TileEntityEnderChestRenderer_modelChest.exists())
        {
            Config.warn("Field not found: TileEntityEnderChestRenderer.modelChest");
            return null;
        }
        else
        {
            Reflector.setFieldValue(tileentityspecialrenderer, Reflector.TileEntityEnderChestRenderer_modelChest, modelBase);
            return tileentityspecialrenderer;
        }
    }
}
项目:Backmemed    文件:BlockEnderChest.java   
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing heldItem, float side, float hitX, float hitY)
{
    InventoryEnderChest inventoryenderchest = playerIn.getInventoryEnderChest();
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (inventoryenderchest != null && tileentity instanceof TileEntityEnderChest)
    {
        if (worldIn.getBlockState(pos.up()).isNormalCube())
        {
            return true;
        }
        else if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.setChestTileEntity((TileEntityEnderChest)tileentity);
            playerIn.displayGUIChest(inventoryenderchest);
            playerIn.addStat(StatList.ENDERCHEST_OPENED);
            return true;
        }
    }
    else
    {
        return true;
    }
}
项目:CustomWorldGen    文件:BlockEnderChest.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)
{
    InventoryEnderChest inventoryenderchest = playerIn.getInventoryEnderChest();
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (inventoryenderchest != null && tileentity instanceof TileEntityEnderChest)
    {
        if (worldIn.getBlockState(pos.up()).isNormalCube())
        {
            return true;
        }
        else if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.setChestTileEntity((TileEntityEnderChest)tileentity);
            playerIn.displayGUIChest(inventoryenderchest);
            playerIn.addStat(StatList.ENDERCHEST_OPENED);
            return true;
        }
    }
    else
    {
        return true;
    }
}
项目:Enderthing    文件:ContainerKey.java   
@Override
public void onContainerClosed(EntityPlayer playerIn)
{
    super.onContainerClosed(playerIn);

    if (world != null)
    {
        TileEntity te = world.getTileEntity(pos);
        if (te instanceof TileEntityEnderChest)
        {
            TileEntityEnderChest chest = (TileEntityEnderChest) te;
            chest.closeChest();
        }
    }
}
项目:Resilience-Client-Source    文件:BlockEnderChest.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_)
{
    InventoryEnderChest var10 = p_149727_5_.getInventoryEnderChest();
    TileEntityEnderChest var11 = (TileEntityEnderChest)p_149727_1_.getTileEntity(p_149727_2_, p_149727_3_, p_149727_4_);

    if (var10 != null && var11 != null)
    {
        if (p_149727_1_.getBlock(p_149727_2_, p_149727_3_ + 1, p_149727_4_).isNormalCube())
        {
            return true;
        }
        else if (p_149727_1_.isClient)
        {
            return true;
        }
        else
        {
            var10.func_146031_a(var11);
            p_149727_5_.displayGUIChest(var10);
            return true;
        }
    }
    else
    {
        return true;
    }
}
项目:enderutilities    文件:ItemEnderBag.java   
@Override
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos,
        EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
{
    TileEntity te = world.getTileEntity(pos);

    if (player.isSneaking() && te != null &&
        (te.getClass() == TileEntityEnderChest.class || te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side)))
    {
        return super.onItemUse(player, world, pos, hand, side, hitX, hitY, hitZ);
    }

    return EnumActionResult.PASS;
}
项目:ExpandedRailsMod    文件:BlockEnderChest.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)
{
    InventoryEnderChest inventoryenderchest = playerIn.getInventoryEnderChest();
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (inventoryenderchest != null && tileentity instanceof TileEntityEnderChest)
    {
        if (worldIn.getBlockState(pos.up()).isNormalCube())
        {
            return true;
        }
        else if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.setChestTileEntity((TileEntityEnderChest)tileentity);
            playerIn.displayGUIChest(inventoryenderchest);
            playerIn.addStat(StatList.ENDERCHEST_OPENED);
            return true;
        }
    }
    else
    {
        return true;
    }
}
项目:Cauldron    文件:BlockEnderChest.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_)
{
    InventoryEnderChest inventoryenderchest = p_149727_5_.getInventoryEnderChest();
    TileEntityEnderChest tileentityenderchest = (TileEntityEnderChest)p_149727_1_.getTileEntity(p_149727_2_, p_149727_3_, p_149727_4_);

    if (inventoryenderchest != null && tileentityenderchest != null)
    {
        if (p_149727_1_.getBlock(p_149727_2_, p_149727_3_ + 1, p_149727_4_).isNormalCube())
        {
            return true;
        }
        else if (p_149727_1_.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.func_146031_a(tileentityenderchest);
            p_149727_5_.displayGUIChest(inventoryenderchest);
            return true;
        }
    }
    else
    {
        return true;
    }
}
项目:Cauldron    文件:BlockEnderChest.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_)
{
    InventoryEnderChest inventoryenderchest = p_149727_5_.getInventoryEnderChest();
    TileEntityEnderChest tileentityenderchest = (TileEntityEnderChest)p_149727_1_.getTileEntity(p_149727_2_, p_149727_3_, p_149727_4_);

    if (inventoryenderchest != null && tileentityenderchest != null)
    {
        if (p_149727_1_.getBlock(p_149727_2_, p_149727_3_ + 1, p_149727_4_).isNormalCube())
        {
            return true;
        }
        else if (p_149727_1_.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.func_146031_a(tileentityenderchest);
            p_149727_5_.displayGUIChest(inventoryenderchest);
            return true;
        }
    }
    else
    {
        return true;
    }
}
项目:RuneCraftery    文件:BlockEnderChest.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)
{
    InventoryEnderChest inventoryenderchest = par5EntityPlayer.getInventoryEnderChest();
    TileEntityEnderChest tileentityenderchest = (TileEntityEnderChest)par1World.getBlockTileEntity(par2, par3, par4);

    if (inventoryenderchest != null && tileentityenderchest != null)
    {
        if (par1World.isBlockNormalCube(par2, par3 + 1, par4))
        {
            return true;
        }
        else if (par1World.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.setAssociatedChest(tileentityenderchest);
            par5EntityPlayer.displayGUIChest(inventoryenderchest);
            return true;
        }
    }
    else
    {
        return true;
    }
}
项目:BetterNutritionMod    文件:BlockEnderChest.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)
{
    InventoryEnderChest inventoryenderchest = par5EntityPlayer.getInventoryEnderChest();
    TileEntityEnderChest tileentityenderchest = (TileEntityEnderChest)par1World.getBlockTileEntity(par2, par3, par4);

    if (inventoryenderchest != null && tileentityenderchest != null)
    {
        if (par1World.isBlockNormalCube(par2, par3 + 1, par4))
        {
            return true;
        }
        else if (par1World.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.setAssociatedChest(tileentityenderchest);
            par5EntityPlayer.displayGUIChest(inventoryenderchest);
            return true;
        }
    }
    else
    {
        return true;
    }
}
项目:OpenBlocks    文件:MagnetWhitelists.java   
public void initTesters() {
    entityWhitelist.addTester(new ClassTester<Entity>(EntityItem.class));
    entityWhitelist.addTester(new ClassTester<Entity>(EntityBoat.class));
    entityWhitelist.addTester(new ClassTester<Entity>(EntityMinecart.class));
    MinecraftForge.EVENT_BUS.post(new EntityRegisterEvent(entityWhitelist));

    blockWhitelist.addTester(o -> {
        float hardness = o.blockState.getBlockHardness(o.world, o);
        return (hardness < 0)? Result.REJECT : Result.CONTINUE;
    });

    blockWhitelist.addTester(o -> o.blockState.getRenderType() == EnumBlockRenderType.MODEL? Result.ACCEPT : Result.CONTINUE);

    blockWhitelist.addTester(createBlockClassTester(BlockSand.class));
    blockWhitelist.addTester(createBlockClassTester(BlockStairs.class));
    blockWhitelist.addTester(createBlockClassTester(BlockFence.class));
    blockWhitelist.addTester(createBlockClassTester(BlockFenceGate.class));
    blockWhitelist.addTester(createBlockIdentityTester(Blocks.CACTUS));
    MinecraftForge.EVENT_BUS.post(new BlockRegisterEvent(blockWhitelist));

    tileEntityWhitelist
            .addTester(new ClassTester<TileEntity>(TileEntityBeacon.class))
            .addTester(new ClassTester<TileEntity>(TileEntityBrewingStand.class))
            .addTester(new ClassTester<TileEntity>(TileEntityChest.class))
            .addTester(new ClassTester<TileEntity>(TileEntityCommandBlock.class))
            .addTester(new ClassTester<TileEntity>(TileEntityDispenser.class))
            .addTester(new ClassTester<TileEntity>(TileEntityEnchantmentTable.class))
            .addTester(new ClassTester<TileEntity>(TileEntityEnderChest.class))
            .addTester(new ClassTester<TileEntity>(TileEntityFurnace.class))
            .addTester(new ClassTester<TileEntity>(TileEntityHopper.class))
            .addTester(new ClassTester<TileEntity>(TileEntityNote.class))
            .addTester(new ClassTester<TileEntity>(TileEntityJukebox.class));
}
项目:bit-client    文件:ModuleChestESP.java   
public ModuleChestESP() {
    super("ChestESP", "Chest esp", Ordering.RENDER, 0, 0);
    addValue(rainbow);
    addListener(new Listener("chestesp_3d", Render3DEvent.class) {
        @Override
        public void call(Event e) {
            GL11.glPushMatrix();
            for (TileEntity ent : Wrapper.loadedTileEntityList()) {
                if (!(ent instanceof TileEntityChest) && !(ent instanceof TileEntityEnderChest)) continue;

                double posX = ent.field_145851_c - RenderManager.field_78725_b;
                double posY = ent.field_145848_d - RenderManager.field_78726_c;
                double posZ = ent.field_145849_e - RenderManager.field_78723_d;

                AxisAlignedBB box = null;

                if (ent instanceof TileEntityChest) {
                    TileEntityChest chest = (TileEntityChest) ent;

                    if (ReflectionUtil.getFieldValue("field_145990_j", chest) != null)
                        box = AxisAlignedBB.func_72330_a(posX + 0.06, posY, posZ + 0.06, posX + 1.94, posY + 0.875, posZ + 0.9375);
                    else if (ReflectionUtil.getFieldValue("field_145988_l", chest) != null)
                        box = AxisAlignedBB.func_72330_a(posX + 0.06, posY, posZ + 0.06, posX + 0.94, posY + 0.875, posZ + 1.9375);
                    else if (ReflectionUtil.getFieldValue("field_145988_l", chest) != null || ReflectionUtil.getFieldValue("field_145990_j", chest) != null
                            || ReflectionUtil.getFieldValue("field_145992_i", chest) != null || ReflectionUtil.getFieldValue("field_145991_k", chest) != null) {
                    } else
                        box = AxisAlignedBB.func_72330_a(posX + 0.06, posY, posZ + 0.06, posX + 0.94, posY + 0.875, posZ + 0.9375);
                } else {
                    box = AxisAlignedBB.func_72330_a(posX + 0.06, posY, posZ + 0.06, posX + 0.94, posY + 0.875, posZ + 0.9375);
                }
                if (box == null) continue;
                int color = ent instanceof TileEntityChest ? new Color(43, 179, 255).getRGB() : new Color(216, 27, 255).getRGB();
                if (rainbow.getValue()) color = ColorUtil.rainbow(Wrapper.loadedTileEntityList().indexOf(ent));
                GL11.glPushMatrix();
                RenderUtil.drawBox(box, new ColorBuilder(color).withAlpha(65).build_hex(), true);
                RenderUtil.drawBoxOutline(box, new ColorBuilder(color).withAlpha(125).build_hex(), true);
                GL11.glPopMatrix();
            }
            GL11.glPopMatrix();
        }
    });
}
项目:DecompiledMinecraft    文件:BlockEnderChest.java   
/**
 * Returns a new instance of a block's tile entity class. Called on placing the block.
 */
public TileEntity createNewTileEntity(World worldIn, int meta)
{
    return new TileEntityEnderChest();
}
项目:DecompiledMinecraft    文件:InventoryEnderChest.java   
public void setChestTileEntity(TileEntityEnderChest chestTileEntity)
{
    this.associatedChest = chestTileEntity;
}
项目:DecompiledMinecraft    文件:BlockEnderChest.java   
/**
 * Returns a new instance of a block's tile entity class. Called on placing the block.
 */
public TileEntity createNewTileEntity(World worldIn, int meta)
{
    return new TileEntityEnderChest();
}
项目:DecompiledMinecraft    文件:InventoryEnderChest.java   
public void setChestTileEntity(TileEntityEnderChest chestTileEntity)
{
    this.associatedChest = chestTileEntity;
}
项目:DecompiledMinecraft    文件:TileEntityEnderChestRenderer.java   
public void renderTileEntityAt(TileEntityEnderChest te, double x, double y, double z, float partialTicks, int destroyStage)
{
    int i = 0;

    if (te.hasWorldObj())
    {
        i = te.getBlockMetadata();
    }

    if (destroyStage >= 0)
    {
        this.bindTexture(DESTROY_STAGES[destroyStage]);
        GlStateManager.matrixMode(5890);
        GlStateManager.pushMatrix();
        GlStateManager.scale(4.0F, 4.0F, 1.0F);
        GlStateManager.translate(0.0625F, 0.0625F, 0.0625F);
        GlStateManager.matrixMode(5888);
    }
    else
    {
        this.bindTexture(ENDER_CHEST_TEXTURE);
    }

    GlStateManager.pushMatrix();
    GlStateManager.enableRescaleNormal();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.translate((float)x, (float)y + 1.0F, (float)z + 1.0F);
    GlStateManager.scale(1.0F, -1.0F, -1.0F);
    GlStateManager.translate(0.5F, 0.5F, 0.5F);
    int j = 0;

    if (i == 2)
    {
        j = 180;
    }

    if (i == 3)
    {
        j = 0;
    }

    if (i == 4)
    {
        j = 90;
    }

    if (i == 5)
    {
        j = -90;
    }

    GlStateManager.rotate((float)j, 0.0F, 1.0F, 0.0F);
    GlStateManager.translate(-0.5F, -0.5F, -0.5F);
    float f = te.prevLidAngle + (te.lidAngle - te.prevLidAngle) * partialTicks;
    f = 1.0F - f;
    f = 1.0F - f * f * f;
    this.field_147521_c.chestLid.rotateAngleX = -(f * (float)Math.PI / 2.0F);
    this.field_147521_c.renderAll();
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

    if (destroyStage >= 0)
    {
        GlStateManager.matrixMode(5890);
        GlStateManager.popMatrix();
        GlStateManager.matrixMode(5888);
    }
}
项目:BaseClient    文件:BlockEnderChest.java   
/**
 * Returns a new instance of a block's tile entity class. Called on placing the block.
 */
public TileEntity createNewTileEntity(World worldIn, int meta)
{
    return new TileEntityEnderChest();
}
项目:BaseClient    文件:InventoryEnderChest.java   
public void setChestTileEntity(TileEntityEnderChest chestTileEntity)
{
    this.associatedChest = chestTileEntity;
}