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


Java TileEntityPiston类代码示例

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


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

示例1: getCollisionBoundingBox

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的package包/类
public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state)
{
    TileEntityPiston tileentitypiston = this.getTileEntity(worldIn, pos);

    if (tileentitypiston == null)
    {
        return null;
    }
    else
    {
        float f = tileentitypiston.getProgress(0.0F);

        if (tileentitypiston.isExtending())
        {
            f = 1.0F - f;
        }

        return this.getBoundingBox(worldIn, pos, tileentitypiston.getPistonState(), f, tileentitypiston.getFacing());
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:21,代码来源:BlockPistonMoving.java

示例2: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的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: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的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

示例4: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的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

示例5: getCollisionBoundingBoxFromPool

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的package包/类
/**
 * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
 * cleared to be reused)
 */
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
{
    TileEntityPiston var5 = this.func_149963_e(p_149668_1_, p_149668_2_, p_149668_3_, p_149668_4_);

    if (var5 == null)
    {
        return null;
    }
    else
    {
        float var6 = var5.func_145860_a(0.0F);

        if (var5.func_145868_b())
        {
            var6 = 1.0F - var6;
        }

        return this.func_149964_a(p_149668_1_, p_149668_2_, p_149668_3_, p_149668_4_, var5.func_145861_a(), var6, var5.func_145864_c());
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:25,代码来源:BlockPistonMoving.java

示例6: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的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

示例7: getCollisionBoundingBoxFromPool

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的package包/类
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
{
    TileEntityPiston tileentitypiston = this.func_149963_e(p_149668_1_, p_149668_2_, p_149668_3_, p_149668_4_);

    if (tileentitypiston == null)
    {
        return null;
    }
    else
    {
        float f = tileentitypiston.func_145860_a(0.0F);

        if (tileentitypiston.isExtending())
        {
            f = 1.0F - f;
        }

        return this.func_149964_a(p_149668_1_, p_149668_2_, p_149668_3_, p_149668_4_, tileentitypiston.getStoredBlockID(), f, tileentitypiston.getPistonOrientation());
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:21,代码来源:BlockPistonMoving.java

示例8: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的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: func_71902_a

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的package包/类
public void func_71902_a(IBlockAccess p_71902_1_, int p_71902_2_, int p_71902_3_, int p_71902_4_) {
   TileEntityPiston var5 = this.func_72295_d(p_71902_1_, p_71902_2_, p_71902_3_, p_71902_4_);
   if(var5 != null) {
      Block var6 = Block.field_71973_m[var5.func_70340_a()];
      if(var6 == null || var6 == this) {
         return;
      }

      var6.func_71902_a(p_71902_1_, p_71902_2_, p_71902_3_, p_71902_4_);
      float var7 = var5.func_70333_a(0.0F);
      if(var5.func_70341_b()) {
         var7 = 1.0F - var7;
      }

      int var8 = var5.func_70336_c();
      this.field_72026_ch = var6.func_83009_v() - (double)((float)Facing.field_71586_b[var8] * var7);
      this.field_72023_ci = var6.func_83008_x() - (double)((float)Facing.field_71587_c[var8] * var7);
      this.field_72024_cj = var6.func_83005_z() - (double)((float)Facing.field_71585_d[var8] * var7);
      this.field_72021_ck = var6.func_83007_w() - (double)((float)Facing.field_71586_b[var8] * var7);
      this.field_72022_cl = var6.func_83010_y() - (double)((float)Facing.field_71587_c[var8] * var7);
      this.field_72019_cm = var6.func_83006_A() - (double)((float)Facing.field_71585_d[var8] * var7);
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:25,代码来源:BlockPistonMoving.java

示例10: getCollisionBoundingBoxFromPool

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的package包/类
/**
 * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
 * cleared to be reused)
 */
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
    TileEntityPiston tileentitypiston = this.getTileEntityAtLocation(par1World, par2, par3, par4);

    if (tileentitypiston == null)
    {
        return null;
    }
    else
    {
        float f = tileentitypiston.getProgress(0.0F);

        if (tileentitypiston.isExtending())
        {
            f = 1.0F - f;
        }

        return this.getAxisAlignedBB(par1World, par2, par3, par4, tileentitypiston.getStoredBlockID(), f, tileentitypiston.getPistonOrientation());
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:25,代码来源:BlockPistonMoving.java

示例11: TileEntityRenderer

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的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

示例12: storeTileEntity

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的package包/类
public static void storeTileEntity(TileEntityPiston tePiston, NBTTagCompound teData) {
    if (teData != null) {
        Class c = tePiston.getClass();
        try {
            Field storedTileEntityData = c.getDeclaredField("storedTileEntityData");
            storedTileEntityData.set(tePiston, teData);

            // construct and cache a "dummy" te for rendering
            Field cachedTileEntity = c.getDeclaredField("cachedTileEntity");
            TileEntity cachedTE = TileEntity.createAndLoadEntity(teData);
            cachedTE.setWorldObj(tePiston.getWorldObj());
            cachedTE.blockMetadata = tePiston.getBlockMetadata();
            cachedTE.blockType = tePiston.getStoredBlockID();
            
            cachedTileEntity.set(tePiston, cachedTE);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
 
开发者ID:cheeseum-mods,项目名称:PistonEverything,代码行数:21,代码来源:PistonEverything.java

示例13: restoreStoredPistonBlock

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的package包/类
public static void restoreStoredPistonBlock (World worldObj, int xCoord, int yCoord, int zCoord, Block block, int meta, TileEntityPiston tePiston)
{
    NBTTagCompound tileEntityData = null;
     
    Class c = tePiston.getClass();
    try {
        Field storedTileEntityData = c.getDeclaredField("storedTileEntityData");
        tileEntityData = (NBTTagCompound) storedTileEntityData.get(tePiston);

        Field cachedTileEntity = c.getDeclaredField("cachedTileEntity");
        cachedTileEntity.set(tePiston, null);
    } catch (Exception e) {
        e.printStackTrace();
    }
    
    worldObj.setBlock(xCoord, yCoord, zCoord, block);
    worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, meta, 3);
    
    TileEntity te = TileEntity.createAndLoadEntity(tileEntityData);
    te.xCoord = xCoord;
    te.yCoord = yCoord;
    te.zCoord = zCoord;
    worldObj.setTileEntity(xCoord, yCoord, zCoord, te);

    worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, block);
}
 
开发者ID:cheeseum-mods,项目名称:PistonEverything,代码行数:27,代码来源:PistonEverything.java

示例14: isRetractingStickyPistonFacing

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的package包/类
public boolean isRetractingStickyPistonFacing(int x, int y, int z, int facing)
{
    BlockPos pos = new BlockPos(x,y,z);
    IBlockState state = world.getBlockState(pos);
    if(state.getBlock() != Blocks.PISTON_EXTENSION)
        return false;
    
    TileEntity t = world.getTileEntity(pos);
    if(!(t instanceof TileEntityPiston))
        return false;
    
    TileEntityPiston tep = (TileEntityPiston)t;
    return tep.getFacing().ordinal() == facing && !tep.isExtending() && tep.getPistonState().getBlock() == Blocks.STICKY_PISTON;
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:15,代码来源:EntityWirelessTracker.java

示例15: breakBlock

import net.minecraft.tileentity.TileEntityPiston; //导入依赖的package包/类
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
{
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (tileentity instanceof TileEntityPiston)
    {
        ((TileEntityPiston)tileentity).clearPistonTileEntity();
    }
    else
    {
        super.breakBlock(worldIn, pos, state);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:14,代码来源:BlockPistonMoving.java


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