本文整理汇总了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);
}
}
示例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);
}
}
示例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:
}
}
}
示例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:
}
}
}
示例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;
}
示例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)});
}
}
示例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);
}
}
示例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;
}
示例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;
}
}
示例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);
}
}
示例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)});
}
}
示例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;
}
示例13: getRenderType
import net.minecraft.util.EnumBlockRenderType; //导入依赖的package包/类
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
return EnumBlockRenderType.MODEL;
}
示例14: getRenderType
import net.minecraft.util.EnumBlockRenderType; //导入依赖的package包/类
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
return EnumBlockRenderType.MODEL;
}
示例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);
}