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); } }
@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); } }
@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: } } }
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; }
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)}); } }
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); } }
@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; }
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; } }
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); } }
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)}); } }
/** * 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; }
@Override public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.MODEL; }
public static boolean isRenderIDCamo(EnumBlockRenderType type) { return false;//TODO 1.8 remove PneumaticCraftAPIHandler.getInstance().concealableRenderIds.contains(renderID); }
@Override public EnumBlockRenderType getRenderType() { return delegate.getRenderType(); }
public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.MODEL; }
/** * 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; }
public BlockContainerBase(String unlocalizedName, String modId, Class<? extends TileEntity> tileEntityClass, Material materialIn) { this(unlocalizedName, modId, tileEntityClass, EnumBlockRenderType.MODEL, materialIn); }
public BlockContainerBase(String unlocalizedName, String modId, Class<? extends TileEntity> tileEntityClass, EnumBlockRenderType renderType, Material materialIn) { this(unlocalizedName, modId, tileEntityClass, renderType, true, materialIn, materialIn.getMaterialMapColor()); }
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()); }
@Override public EnumBlockRenderType getRenderType(IBlockState state) { return renderType; }
@Override public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.ENTITYBLOCK_ANIMATED; }
@Nonnull @Override public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.MODEL; }