@SideOnly(Side.CLIENT) @Override public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { int l = par1World.getBlockMetadata(par2, par3, par4); Block i = par1World.getBlock(par2, par3 - 1, par2); double d0 = (double) ((float) par2 + 0.25F + par5Random.nextFloat() / 2); double d1 = (double) ((float) par3 + par5Random.nextFloat()); double d2 = (double) ((float) par4 + 0.25F + par5Random.nextFloat() / 2); double d3 = 0.0199999988079071D; double d4 = 0.27000001072883606D; if (!DCsConfig.noRenderFoodsSteam) { EntityDCCloudFX cloud = new EntityDCCloudFX(par1World, d0, d1, d2, 0.0D, d3, 0.0D); cloud.setParticleIcon(ParticleTex.getInstance().getIcon("cloud")); FMLClientHandler.instance().getClient().effectRenderer.addEffect(cloud); } }
@SideOnly(Side.CLIENT) @Override public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { int l = par1World.getBlockMetadata(par2, par3, par4); Block i = par1World.getBlock(par2, par3 - 1, par2); boolean b = false; // パーティクルの設定 String FXName = "blink"; float R = 1.0F; float G = 1.0F; float B = 1.0F; TileIncenseBase tile = (TileIncenseBase) par1World.getTileEntity(par2, par3, par4); if (tile != null) { b = tile.getActive(); if (b) { if (tile.hasItem() && tile.getItemstack().getItem() instanceof IIncenseEffect) { IIncenseEffect incense = (IIncenseEffect) tile.getItemstack().getItem(); FXName = incense.particleIcon(); R = incense.particleColorR(); G = incense.particleColorG(); B = incense.particleColorB(); } } } double d0 = (double) ((float) par2 + par5Random.nextFloat()); double d1 = (double) ((float) par3 - 0.4F + par5Random.nextFloat()); double d2 = (double) ((float) par4 + par5Random.nextFloat()); double d3 = 0.0099999988079071D; double d4 = 0.0099999988079071D; double d5 = 0.0099999988079071D; if (!DCsConfig.noRenderFoodsSteam && b) { EntityDCCloudFX cloud = new EntityDCCloudFX(par1World, d0, d1, d2, 0.0D, d4, 0.0D); cloud.setParticleIcon(ParticleTex.getInstance().getIcon(FXName)); cloud.setRBGColorF(R, G, B); cloud.setAlphaF(0.75F); FMLClientHandler.instance().getClient().effectRenderer.addEffect(cloud); } }