Java 类net.minecraft.util.EnumBlockRenderType 实例源码

项目:CustomWorldGen    文件:ParticleFallingDust.java   
public Particle createParticle(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
{
    IBlockState iblockstate = Block.getStateById(p_178902_15_[0]);

    if (iblockstate.getBlock() != Blocks.AIR && iblockstate.getRenderType() == EnumBlockRenderType.INVISIBLE)
    {
        return null;
    }
    else
    {
        int i = Minecraft.getMinecraft().getBlockColors().getColor(iblockstate);

        if (iblockstate.getBlock() instanceof BlockFalling)
        {
            i = ((BlockFalling)iblockstate.getBlock()).getDustColor(iblockstate);
        }

        float f = (float)(i >> 16 & 255) / 255.0F;
        float f1 = (float)(i >> 8 & 255) / 255.0F;
        float f2 = (float)(i & 255) / 255.0F;
        return new ParticleFallingDust(worldIn, xCoordIn, yCoordIn, zCoordIn, f, f1, f2);
    }
}
项目:Backmemed    文件:ParticleFallingDust.java   
@Nullable
public Particle createParticle(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
{
    IBlockState iblockstate = Block.getStateById(p_178902_15_[0]);

    if (iblockstate.getBlock() != Blocks.AIR && iblockstate.getRenderType() == EnumBlockRenderType.INVISIBLE)
    {
        return null;
    }
    else
    {
        int i = Minecraft.getMinecraft().getBlockColors().getColor(iblockstate);

        if (iblockstate.getBlock() instanceof BlockFalling)
        {
            i = ((BlockFalling)iblockstate.getBlock()).getDustColor(iblockstate);
        }

        float f = (float)(i >> 16 & 255) / 255.0F;
        float f1 = (float)(i >> 8 & 255) / 255.0F;
        float f2 = (float)(i & 255) / 255.0F;
        return new ParticleFallingDust(worldIn, xCoordIn, yCoordIn, zCoordIn, f, f1, f2);
    }
}
项目:Backmemed    文件:BlockRendererDispatcher.java   
@SuppressWarnings("incomplete-switch")
public void renderBlockBrightness(IBlockState state, float brightness)
{
    EnumBlockRenderType enumblockrendertype = state.getRenderType();

    if (enumblockrendertype != EnumBlockRenderType.INVISIBLE)
    {
        switch (enumblockrendertype)
        {
            case MODEL:
                IBakedModel ibakedmodel = this.getModelForState(state);
                this.blockModelRenderer.renderModelBrightness(ibakedmodel, state, brightness, true);
                break;

            case ENTITYBLOCK_ANIMATED:
                this.chestRenderer.renderChestBrightness(state.getBlock(), brightness);

            case LIQUID:
        }
    }
}
项目:CustomWorldGen    文件:BlockRendererDispatcher.java   
@SuppressWarnings("incomplete-switch")
public void renderBlockBrightness(IBlockState state, float brightness)
{
    EnumBlockRenderType enumblockrendertype = state.getRenderType();

    if (enumblockrendertype != EnumBlockRenderType.INVISIBLE)
    {
        switch (enumblockrendertype)
        {
            case MODEL:
                IBakedModel ibakedmodel = this.getModelForState(state);
                this.blockModelRenderer.renderModelBrightness(ibakedmodel, state, brightness, true);
                break;
            case ENTITYBLOCK_ANIMATED:
                this.chestRenderer.renderChestBrightness(state.getBlock(), brightness);
            case LIQUID:
        }
    }
}
项目:MrglgaghCore    文件:BlockContainerBase.java   
public BlockContainerBase(String unlocalizedName, String modId, Class<? extends TileEntity> tileEntityClass, EnumBlockRenderType renderType, boolean opaque, Material materialIn, MapColor color) {
    super(materialIn, color);
    setUnlocalizedName(unlocalizedName);
    setRegistryName(new ResourceLocation(modId, unlocalizedName));
    this.tileEntityClass = tileEntityClass;
    this.renderType = renderType;
    this.opaque = opaque;
}
项目:Backmemed    文件:Entity.java   
protected void createRunningParticles()
{
    int i = MathHelper.floor(this.posX);
    int j = MathHelper.floor(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    IBlockState iblockstate = this.world.getBlockState(blockpos);

    if (iblockstate.getRenderType() != EnumBlockRenderType.INVISIBLE)
    {
        this.world.spawnParticle(EnumParticleTypes.BLOCK_CRACK, this.posX + ((double)this.rand.nextFloat() - 0.5D) * (double)this.width, this.getEntityBoundingBox().minY + 0.1D, this.posZ + ((double)this.rand.nextFloat() - 0.5D) * (double)this.width, -this.motionX * 4.0D, 1.5D, -this.motionZ * 4.0D, new int[] {Block.getStateId(iblockstate)});
    }
}
项目:CustomWorldGen    文件:BlockRendererDispatcher.java   
public void renderBlockDamage(IBlockState state, BlockPos pos, TextureAtlasSprite texture, IBlockAccess blockAccess)
{
    if (state.getRenderType() == EnumBlockRenderType.MODEL)
    {
        state = state.getActualState(blockAccess, pos);
        IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(state);
        IBakedModel ibakedmodel1 = net.minecraftforge.client.ForgeHooksClient.getDamageModel(ibakedmodel, texture, state, blockAccess, pos);
        this.blockModelRenderer.renderModel(blockAccess, ibakedmodel1, state, pos, Tessellator.getInstance().getBuffer(), true);
    }
}
项目:Backmemed    文件:Block.java   
@Deprecated

    /**
     * The type of render function called. MODEL for mixed tesr and static model, MODELBLOCK_ANIMATED for TESR-only,
     * LIQUID for vanilla liquids, INVISIBLE to skip all rendering
     */
    public EnumBlockRenderType getRenderType(IBlockState state)
    {
        return EnumBlockRenderType.MODEL;
    }
项目:CustomWorldGen    文件:BlockRendererDispatcher.java   
public boolean isEntityBlockAnimated(Block blockIn)
{
    if (blockIn == null)
    {
        return false;
    }
    else
    {
        EnumBlockRenderType enumblockrendertype = blockIn.getDefaultState().getRenderType();
        return enumblockrendertype == EnumBlockRenderType.MODEL ? false : enumblockrendertype == EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
    }
}
项目:Backmemed    文件:BlockRendererDispatcher.java   
public void renderBlockDamage(IBlockState state, BlockPos pos, TextureAtlasSprite texture, IBlockAccess blockAccess)
{
    if (state.getRenderType() == EnumBlockRenderType.MODEL)
    {
        state = state.getActualState(blockAccess, pos);
        IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(state);
        IBakedModel ibakedmodel1 = (new SimpleBakedModel.Builder(state, ibakedmodel, texture, pos)).makeBakedModel();
        this.blockModelRenderer.renderModel(blockAccess, ibakedmodel1, state, pos, Tessellator.getInstance().getBuffer(), true);
    }
}
项目:CustomWorldGen    文件:Entity.java   
protected void createRunningParticles()
{
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor_double(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    IBlockState iblockstate = this.worldObj.getBlockState(blockpos);

    if (iblockstate.getRenderType() != EnumBlockRenderType.INVISIBLE)
    {
        this.worldObj.spawnParticle(EnumParticleTypes.BLOCK_CRACK, this.posX + ((double)this.rand.nextFloat() - 0.5D) * (double)this.width, this.getEntityBoundingBox().minY + 0.1D, this.posZ + ((double)this.rand.nextFloat() - 0.5D) * (double)this.width, -this.motionX * 4.0D, 1.5D, -this.motionZ * 4.0D, new int[] {Block.getStateId(iblockstate)});
    }
}
项目:CustomWorldGen    文件:BlockLiquid.java   
/**
 * The type of render function called. MODEL for mixed tesr and static model, MODELBLOCK_ANIMATED for TESR-only,
 * LIQUID for vanilla liquids, INVISIBLE to skip all rendering
 */
public EnumBlockRenderType getRenderType(IBlockState state)
{
    return EnumBlockRenderType.LIQUID;
}
项目:MineCamera    文件:BlockPictureFrame.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}
项目:MineCamera    文件:BlockPhotoProcessor.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}
项目:pnc-repressurized    文件:BlockPneumaticCraft.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}
项目:pnc-repressurized    文件:PneumaticCraftUtils.java   
public static boolean isRenderIDCamo(EnumBlockRenderType type) {
    return false;//TODO 1.8 remove PneumaticCraftAPIHandler.getInstance().concealableRenderIds.contains(renderID);
}
项目:HardVox    文件:BlockStateDelegate.java   
@Override
public EnumBlockRenderType getRenderType() {
    return delegate.getRenderType();
}
项目:HeroUtils    文件:HeroHead.java   
public EnumBlockRenderType getRenderType(IBlockState state)
{
    return EnumBlockRenderType.MODEL;
}
项目:Soot    文件:BlockEmberBurst.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}
项目:Soot    文件:BlockEmberFunnel.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}
项目:CustomWorldGen    文件:BlockHopper.java   
/**
 * The type of render function called. MODEL for mixed tesr and static model, MODELBLOCK_ANIMATED for TESR-only,
 * LIQUID for vanilla liquids, INVISIBLE to skip all rendering
 */
public EnumBlockRenderType getRenderType(IBlockState state)
{
    return EnumBlockRenderType.MODEL;
}
项目:harshencastle    文件:BloodPlacer.java   
public EnumBlockRenderType getRenderType(IBlockState state)
{
    return EnumBlockRenderType.MODEL;
}
项目:harshencastle    文件:BlockOfHeads.java   
public EnumBlockRenderType getRenderType(IBlockState state)
{
    return EnumBlockRenderType.MODEL;
}
项目:ModularMachinery    文件:BlockCasing.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}
项目:MrglgaghCore    文件:BlockContainerBase.java   
public BlockContainerBase(String unlocalizedName, String modId, Class<? extends TileEntity> tileEntityClass, Material materialIn) {
    this(unlocalizedName, modId, tileEntityClass, EnumBlockRenderType.MODEL, materialIn);
}
项目:MrglgaghCore    文件:BlockContainerBase.java   
public BlockContainerBase(String unlocalizedName, String modId, Class<? extends TileEntity> tileEntityClass, EnumBlockRenderType renderType, Material materialIn) {
    this(unlocalizedName, modId, tileEntityClass, renderType, true, materialIn, materialIn.getMaterialMapColor());
}
项目:MrglgaghCore    文件:BlockContainerBase.java   
public BlockContainerBase(String unlocalizedName, String modId, Class<? extends TileEntity> tileEntityClass, EnumBlockRenderType renderType, boolean opaque, Material materialIn) {
    this(unlocalizedName, modId, tileEntityClass, renderType, opaque, materialIn, materialIn.getMaterialMapColor());
}
项目:MrglgaghCore    文件:BlockContainerBase.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return renderType;
}
项目:Etheric    文件:BlockRift.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
}
项目:Got-Wood    文件:BlockTreeTap.java   
@Nonnull
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
  return EnumBlockRenderType.MODEL;
}
项目:Got-Wood    文件:BlockTreeTap.java   
@Nonnull
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}
项目:DankNull    文件:BlockContainerBase.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}
项目:ArcaneMagic    文件:BlockAnalyzer.java   
public EnumBlockRenderType getRenderType(IBlockState state)
{
    return EnumBlockRenderType.MODEL;
}
项目:ArcaneMagic    文件:BlockArcaneTransfigurationTable.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state)
{
    return EnumBlockRenderType.MODEL;
}
项目:ArcaneMagic    文件:BlockInfernalSmelter.java   
public EnumBlockRenderType getRenderType(IBlockState state)
{
    return EnumBlockRenderType.MODEL;
}
项目:ArcaneMagic    文件:BlockAnimaConjurer.java   
public EnumBlockRenderType getRenderType(IBlockState state)
{
    return EnumBlockRenderType.MODEL;
}
项目:ArcaneMagic    文件:BlockWritingDesk.java   
public EnumBlockRenderType getRenderType(IBlockState state)
{
    return EnumBlockRenderType.MODEL;
}
项目:Randores2    文件:RandoresTorch.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}
项目:Randores2    文件:RandoresBlock.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}
项目:Randores2    文件:CraftiniumForge.java   
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}