本文整理匯總了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);
}