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


Java EnumBlockRenderType类代码示例

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


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

示例1: createParticle

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

示例2: createParticle

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

示例3: renderBlockBrightness

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

示例4: renderBlockBrightness

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

示例5: BlockContainerBase

import net.minecraft.util.EnumBlockRenderType; //导入依赖的package包/类
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;
}
 
开发者ID:sedlak477,项目名称:MrglgaghCore,代码行数:9,代码来源:BlockContainerBase.java

示例6: createRunningParticles

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

示例7: renderBlockDamage

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

示例8: getRenderType

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

示例9: isEntityBlockAnimated

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

示例10: renderBlockDamage

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

示例11: createRunningParticles

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

示例12: getRenderType

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

示例13: getRenderType

import net.minecraft.util.EnumBlockRenderType; //导入依赖的package包/类
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
	return EnumBlockRenderType.MODEL;
}
 
开发者ID:PorPit,项目名称:MineCamera,代码行数:5,代码来源:BlockPictureFrame.java

示例14: getRenderType

import net.minecraft.util.EnumBlockRenderType; //导入依赖的package包/类
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:5,代码来源:BlockPneumaticCraft.java

示例15: isRenderIDCamo

import net.minecraft.util.EnumBlockRenderType; //导入依赖的package包/类
public static boolean isRenderIDCamo(EnumBlockRenderType type) {
    return false;//TODO 1.8 remove PneumaticCraftAPIHandler.getInstance().concealableRenderIds.contains(renderID);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:4,代码来源:PneumaticCraftUtils.java


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